Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Wilkowski <[email protected]>
  • Loading branch information
dominikwilkowski committed Jul 2, 2016
1 parent adbb32f commit 830f307
Show file tree
Hide file tree
Showing 8 changed files with 318 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
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
10 changes: 10 additions & 0 deletions .gitignore
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
212 changes: 212 additions & 0 deletions Gruntfile.js
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',
]);

};
26 changes: 26 additions & 0 deletions README.md
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 added dev/010-init.js
Empty file.
Empty file added dev/dev.js
Empty file.
58 changes: 58 additions & 0 deletions package.json
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 added prod/index.js
Empty file.

0 comments on commit 830f307

Please sign in to comment.