Adding grunt-watch into Gruntfile and package.json. watch uses source maps for development

This commit is contained in:
mattdesl 2014-03-04 12:12:02 -05:00
parent 138c3b11d0
commit d3b1c45ad1
2 changed files with 6 additions and 4 deletions

View file

@ -185,10 +185,11 @@ module.exports = function(grunt) {
} }
} }
}, },
//Watches and builds for _development_ (source maps)
watch: { watch: {
scripts: { scripts: {
files: ['<%= dirs.src %>/**/*.js'], files: ['<%= dirs.src %>/**/*.js'],
tasks: ['concat'], tasks: ['concat_sourcemap'],
options: { options: {
spawn: false, spawn: false,
} }
@ -214,6 +215,6 @@ module.exports = function(grunt) {
grunt.registerTask('travis', ['build', 'test']); grunt.registerTask('travis', ['build', 'test']);
grunt.registerTask('default', ['build', 'test']); grunt.registerTask('default', ['build', 'test']);
grunt.registerTask('debug-watch', ['concat', 'watch']); grunt.registerTask('debug-watch', ['concat_sourcemap', 'watch:debug']);
}; };

View file

@ -40,6 +40,7 @@
"karma-chrome-launcher": "~0.1", "karma-chrome-launcher": "~0.1",
"karma-firefox-launcher": "~0.1", "karma-firefox-launcher": "~0.1",
"karma-mocha": "~0.1", "karma-mocha": "~0.1",
"karma-spec-reporter": "~0.0.6" "karma-spec-reporter": "~0.0.6",
"grunt-contrib-watch": "~0.5.3"
} }
} }