From 373e5f472f829714939103617cfe14e98d981b18 Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Sun, 21 Sep 2014 08:00:06 +0200 Subject: Removed unused states and templating of main.js --- Gruntfile.js | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index c08fca4..1dfd9b1 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -56,7 +56,6 @@ module.exports = function (grunt) { copy: { dist: { files: [ - // includes files within path and its sub-directories { expand: true, src: ['assets/**'], dest: 'dist/' }, { expand: true, flatten: true, src: ['vendor/*.js'], dest: 'dist/js/' }, { expand: true, src: ['css/**'], dest: 'dist/' }, @@ -72,25 +71,7 @@ module.exports = function (grunt) { } }); - grunt.registerTask('build', ['buildBootstrapper', 'browserify','copy']); + grunt.registerTask('build', ['browserify','copy']); grunt.registerTask('serve', ['build', 'connect:livereload', 'open', 'watch']); grunt.registerTask('default', ['serve']); - grunt.registerTask('prod', ['build', 'copy']); - - grunt.registerTask('buildBootstrapper', 'builds the bootstrapper file correctly', function() { - var stateFiles = grunt.file.expand('game/states/*.js'); - var gameStates = []; - var statePattern = new RegExp(/(\w+).js$/); - stateFiles.forEach(function(file) { - var state = file.match(statePattern)[1]; - if (!!state) { - gameStates.push({shortName: state, stateName: _.capitalize(state) + 'State'}); - } - }); - config.gameStates = gameStates; - console.log(config); - var bootstrapper = grunt.file.read('templates/_main.js.tpl'); - bootstrapper = grunt.template.process(bootstrapper,{data: config}); - grunt.file.write('game/main.js', bootstrapper); - }); }; \ No newline at end of file -- cgit v1.2.3