Skip to content

Commit

Permalink
Grunt added
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanous committed Jan 2, 2015
1 parent bf71abe commit 5bf1ebe
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ node_modules

# Users Environment Variables
.lock-wscript
jshint.xml
build/PhaserMMORPG.concat.js
build/PhaserMMORPG.min.js
67 changes: 67 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*global module:false*/
module.exports = function(grunt) {

require('time-grunt')(grunt);

// Project configuration.
grunt.initConfig({
// Metadata.
meta: {
version: '0.2.0'
},
banner: '/*! PhaserMMORPG - v<%= meta.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* http://mmorpg.astrocity.lv/\n' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> ' +
'YOUR_NAME; Licensed MIT */\n',
// Task configuration.
concat: {
main: {
src: ['js/**/*.js', '!js/lib/**/*.js'],
dest: 'build/PhaserMMORPG.concat.js'
}
},
jshint: {
main : ['js/**/*.js', '!js/lib/**/*.js'],
options: {
browser: true,
curly: true,
eqeqeq: true,
eqnull: true,
forin: true,
newcap: true,
noempty: true,
plusplus: true,
strict: true,
trailing: true,
white: true, //harsh but needed. Douglas Crockford style
reporter:'jslint',
reporterOutput: 'jshint.xml'
}


},


uglify: {
options: {
mangle: true
},
main: {
src: 'build/PhaserMMORPG.concat.js',
dest: 'build/PhaserMMORPG.min.js'
}
},

});

// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');

// Tasks.
grunt.registerTask('default', ['jshint', 'concat', 'uglify']);


};
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,12 @@
"express": "~4.10.6",
"engine.io": "~1.4.3",
"eureca.io": "~0.6.2"
},
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-concat": "~0.5.0",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-uglify": "~0.7.0",
"time-grunt": "~1.0.0"
}
}

0 comments on commit 5bf1ebe

Please sign in to comment.