diff --git a/Gruntfile.js b/Gruntfile.js index 828f37a1..06511e31 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -284,6 +284,11 @@ module.exports = function(grunt) { // Cleans the built files out of the release folder and copies newly built ones over. grunt.registerTask("publish", ["package", "clean:release", "copy:release", "bower"]); + // ---------- + // Dev task. + // Builds, fires up a server and watches for changes. + grunt.registerTask("dev", ["build", "connect", "watch"]); + // ---------- // Default task. // Does a normal build. diff --git a/README.md b/README.md index efb8b4be..2462fdb5 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,10 @@ If you want Grunt to watch your source files and rebuild every time you change o grunt watch +To have it watch your source files and also run a server for you to test in: + + grunt dev + The built files appear in the `build` folder. If you want to build tar and zip files for distribution (they will also appear in the `build` folder), use: