-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Dominik Wilkowski <[email protected]>
- Loading branch information
1 parent
adbb32f
commit 830f307
Showing
8 changed files
with
318 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
indent_style = tab | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = false | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.DS_Store | ||
*.sublime-project | ||
*.sublime-workspace | ||
node_modules | ||
.tmp | ||
temp | ||
.sass-cache | ||
.idea | ||
validation-report.json | ||
validation-status.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,212 @@ | ||
'use strict'; | ||
|
||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
// | ||
// ╔╗ ╔═╗ ╔═╗ ╔═╗ ╔╦╗ | ||
// ╠╩╗ ║╣ ╠═╣ ╚═╗ ║ | ||
// ╚═╝ ╚═╝ ╩ ╩ ╚═╝ ╩ | ||
// Created by Dominik Wilkowski | ||
// | ||
// @desc Beast.js is an ANSI node game | ||
// @author Dominik Wilkowski | ||
// @website https://github.com/dominikwilkowski/beast.js | ||
// @issues https://github.com/dominikwilkowski/beast.js/issues | ||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
|
||
|
||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
// External dependencies | ||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
|
||
|
||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
// Custom functions | ||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
|
||
|
||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
// Settings | ||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
const SETTINGS = function() { | ||
return { | ||
'folders': { | ||
'dev': 'dev/', | ||
'prod': 'prod/', | ||
}, | ||
'files': { | ||
'dev': 'dev.js', | ||
'prod': 'index.js', | ||
'Packagejson': 'package.json', | ||
}, | ||
}; | ||
}; | ||
|
||
|
||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
// Grunt module | ||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
module.exports = (grunt) => { | ||
|
||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
// Dependencies | ||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-text-replace'); | ||
grunt.loadNpmTasks('grunt-wakeup'); | ||
grunt.loadNpmTasks('grunt-font'); | ||
require('time-grunt')(grunt); | ||
|
||
|
||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
// Grunt tasks | ||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
grunt.initConfig({ | ||
|
||
|
||
//---------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
// Package content | ||
//---------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
SETTINGS: SETTINGS(), | ||
pkg: grunt.file.readJSON( SETTINGS().files.Packagejson ), | ||
|
||
|
||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
// Replace version | ||
//-------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
replace: { | ||
dev: { | ||
src: [ | ||
'<%= SETTINGS.folders.dev %><%= SETTINGS.files.dev %>', | ||
], | ||
overwrite: true, | ||
replacements: [ | ||
{ | ||
from: '[Debug]', | ||
to: 'true', | ||
}, | ||
{ | ||
from: '[Name]', | ||
to: '<%= pkg.name %>', | ||
}, | ||
{ | ||
from: '[Version]', | ||
to: 'v<%= pkg.version %>', | ||
}, | ||
], | ||
}, | ||
|
||
prod: { | ||
src: [ | ||
'<%= SETTINGS.folders.prod %><%= SETTINGS.files.prod %>', | ||
], | ||
overwrite: true, | ||
replacements: [ | ||
{ | ||
from: '[Debug]', | ||
to: 'false', | ||
}, | ||
{ | ||
from: '[Name]', | ||
to: '<%= pkg.name %>', | ||
}, | ||
{ | ||
from: '[Version]', | ||
to: 'v<%= pkg.version %>', | ||
}, | ||
], | ||
}, | ||
}, | ||
|
||
|
||
//---------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
// Concat files | ||
//---------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
concat: { | ||
dev: { | ||
src: [ | ||
'<%= SETTINGS.folders.dev %>*.js', | ||
'!<%= SETTINGS.folders.dev %><%= SETTINGS.files.dev %>', | ||
], | ||
dest: '<%= SETTINGS.folders.dev %><%= SETTINGS.files.dev %>', | ||
}, | ||
prod: { | ||
src: [ | ||
'<%= SETTINGS.folders.dev %>/*.js', | ||
'!<%= SETTINGS.folders.dev %><%= SETTINGS.files.dev %>', | ||
], | ||
dest: '<%= SETTINGS.folders.prod %><%= SETTINGS.files.prod %>', | ||
}, | ||
}, | ||
|
||
|
||
//---------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
// Banners | ||
//---------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
font: { | ||
options: { | ||
maxLength: 11, | ||
font: 'chrome', | ||
align: 'center', | ||
colors: ['green', 'cyan', 'white'], | ||
}, | ||
|
||
title: { | ||
text: '<%= pkg.name %>', | ||
}, | ||
}, | ||
|
||
|
||
//---------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
// Wakeup | ||
//---------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
wakeup: { | ||
wakeme: { | ||
options: { | ||
randomize: true, | ||
notifications: true, | ||
}, | ||
}, | ||
}, | ||
|
||
|
||
//---------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
// Watch | ||
//---------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
watch: { | ||
node: { | ||
files: [ | ||
'<%= SETTINGS.folders.dev %>/*.js', | ||
'!<%= SETTINGS.folders.dev %><%= SETTINGS.files.dev %>', | ||
], | ||
tasks: [ | ||
'_build', | ||
'wakeup', | ||
], | ||
}, | ||
}, | ||
|
||
}); | ||
|
||
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------------------------------------ | ||
// Private tasks | ||
//------------------------------------------------------------------------------------------------------------------------------------------------------------ | ||
grunt.registerTask('_build', [ | ||
'concat', | ||
'replace', | ||
]); | ||
|
||
|
||
//------------------------------------------------------------------------------------------------------------------------------------------------------------ | ||
// Build tasks | ||
//------------------------------------------------------------------------------------------------------------------------------------------------------------ | ||
grunt.registerTask('default', [ //run build with watch | ||
'font:title', | ||
'_build', | ||
'wakeup', | ||
'watch', | ||
]); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
```shell | ||
╔╗ ╔═╗ ╔═╗ ╔═╗ ╔╦╗ | ||
╠╩╗ ║╣ ╠═╣ ╚═╗ ║ | ||
╚═╝ ╚═╝ ╩ ╩ ╚═╝ ╩ | ||
``` | ||
|
||
[![NPM](https://nodei.co/npm/beast.js.png?downloads=true)](https://nodei.co/npm/beast.js/) | ||
|
||
|
||
> TODO | ||
|
||
## Contributing | ||
Please look at the coding style and work with it, not against it ;) | ||
|
||
|
||
## Test | ||
TODO | ||
|
||
|
||
## Release History | ||
* 0.1.0 - alpha test | ||
|
||
|
||
## License | ||
Copyright (c) 2016 Dominik Wilkowski. Licensed under the [GNU GPLv3](https://github.com/dominikwilkowski/beast.js/blob/master/LICENSE). |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"name": "beast.js", | ||
"description": "ANSI Beast for node", | ||
"version": "0.1.0", | ||
"homepage": "https://github.com/dominikwilkowski/beast.js", | ||
"author": { | ||
"name": "Dominik Wilkowski", | ||
"email": "[email protected]", | ||
"url": "http://dominik-wilkowski.com/" | ||
}, | ||
"contributors": { | ||
"name": "Dominik Wilkowski", | ||
"email": "[email protected]", | ||
"url": "http://dominik-wilkowski.com/" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/dominikwilkowski/beast.js.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/dominikwilkowski/beast.js/issues" | ||
}, | ||
"engines": { | ||
"node": ">=6.0.0" | ||
}, | ||
"devDependencies": { | ||
"grunt": "^1.0.1", | ||
"grunt-contrib-concat": "^1.0.1", | ||
"grunt-contrib-watch": "^1.0.0", | ||
"grunt-font": "0.0.13", | ||
"grunt-text-replace": "^0.4.0", | ||
"grunt-wakeup": "0.1.3", | ||
"time-grunt": "^1.3.0" | ||
}, | ||
"peerDependencies": {}, | ||
"dependencies": { | ||
"chalk": "^1.0.0", | ||
"window-size": "^0.2.0" | ||
}, | ||
"keywords": [ | ||
"game", | ||
"ansi", | ||
"beast", | ||
"ascii", | ||
"pretty" | ||
], | ||
"main": "prod/index.js", | ||
"bin": { | ||
"beast": "./prod/index.js" | ||
}, | ||
"licenses": [ | ||
{ | ||
"type": "GNU-GPL", | ||
"url": "https://github.com/dominikwilkowski/beast.js/blob/master/LICENSE" | ||
} | ||
], | ||
"license": "GNU-GPLv3" | ||
} |
Empty file.