Implement grunt dev task

This commit is contained in:
kpdecker
2013-12-23 13:13:25 -06:00
parent 62fdd541f5
commit d62620a282
3 changed files with 13 additions and 2 deletions
+10 -2
View File
@@ -150,12 +150,18 @@ module.exports = function(grunt) {
]
}
}
},
watch: {
scripts: {
files: ['src/*', 'lib/**/*.js', 'spec/**/*.js'],
tasks: ['build', 'tests', 'test']
}
}
});
// Build a new version of the library
this.registerTask('build', "Builds a distributable version of the current project", [
'clean',
'parser',
'node',
'globals',
@@ -176,6 +182,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-saucelabs');
grunt.loadNpmTasks('es6-module-packager');
@@ -186,5 +193,6 @@ module.exports = function(grunt) {
grunt.registerTask('travis', process.env.PUBLISH ? ['default', 'sauce', 'metrics', 'publish:latest'] : ['default']);
grunt.registerTask('default', ['build', 'test', 'release']);
grunt.registerTask('dev', ['clean', 'build', 'tests', 'test', 'connect', 'watch']);
grunt.registerTask('default', ['clean', 'build', 'test', 'release']);
};
+2
View File
@@ -406,6 +406,8 @@ in the root of the project. That will build Handlebars and output the
results to the dist/ folder. To re-run tests, run `grunt test` or `npm test`.
You can also run our set of benchmarks with `grunt bench`.
The `grunt dev` implements watching for tests and allows for in browser testing at `http://localhost:9999/spec/`.
If you notice any problems, please report them to the GitHub issue tracker at
[http://github.com/wycats/handlebars.js/issues](http://github.com/wycats/handlebars.js/issues).
Feel free to contact commondream or wycats through GitHub with any other
+1
View File
@@ -41,6 +41,7 @@
"grunt-contrib-jshint": "~0.7.2",
"grunt-contrib-requirejs": "~0.4.1",
"grunt-contrib-uglify": "~0.2.2",
"grunt-contrib-watch": "~0.5.3",
"grunt-saucelabs": "~4.1.2",
"es6-module-packager": "0.x",
"jison": "~0.3.0",