From f3b4290ad35506fac3b6a326b78aa63370a9f114 Mon Sep 17 00:00:00 2001 From: Vit Brunner Date: Tue, 28 Oct 2014 23:32:14 +0100 Subject: [PATCH] Grunt serve task --- Gruntfile.coffee | 10 +++++++++- package.json | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Gruntfile.coffee b/Gruntfile.coffee index 864b1dc..78177c1 100644 --- a/Gruntfile.coffee +++ b/Gruntfile.coffee @@ -15,6 +15,13 @@ module.exports = (grunt) -> } } + watch: { + main: { + files: '<%= var.source %>/**/*' + tasks: ['default'] + } + } + copy: { main: { expand: true @@ -64,6 +71,7 @@ module.exports = (grunt) -> } grunt.loadNpmTasks('grunt-contrib-connect'); + grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-coffee'); grunt.loadNpmTasks('grunt-contrib-stylus'); @@ -71,5 +79,5 @@ module.exports = (grunt) -> grunt.loadNpmTasks("grunt-contrib-qunit"); grunt.registerTask 'default', [ 'copy', 'coffee', 'stylus', 'jade' ] - grunt.registerTask 'server', [ 'connect:server:keepalive' ] + grunt.registerTask 'serve', [ 'default', 'connect', 'watch' ] grunt.registerTask 'test', [ 'default', 'connect', 'qunit' ] diff --git a/package.json b/package.json index 1344140..006a542 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "grunt": "0.4.x", "grunt-cli": "0.1.x", "grunt-contrib-connect": "0.8.x", + "grunt-contrib-watch": "0.6.x", "grunt-contrib-copy": "0.7.x", "grunt-contrib-coffee": "0.12.x", "grunt-contrib-stylus": "0.20.x",