summaryrefslogtreecommitdiff
path: root/Gruntfile.js
diff options
context:
space:
mode:
authorJustin Worthe <justin.worthe@gmail.com>2014-09-21 08:00:06 +0200
committerJustin Worthe <justin.worthe@gmail.com>2014-09-21 08:00:06 +0200
commit373e5f472f829714939103617cfe14e98d981b18 (patch)
tree4fa9bf8609537bad5b12a7e51915f4a07dee2873 /Gruntfile.js
parent8c70582bf01821f8a71910013372e3b12f06cdd3 (diff)
Removed unused states and templating of main.js
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js21
1 files changed, 1 insertions, 20 deletions
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