From cc528c5d613373db312df0d56c58e442ed984fb5 Mon Sep 17 00:00:00 2001 From: Eric Ferraiuolo Date: Wed, 5 Jun 2013 18:51:10 -0400 Subject: [PATCH] Add `grunt watch` task --- Gruntfile.js | 14 ++++++++++++++ package.json | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 36a8127..9ef7ec8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -227,6 +227,19 @@ grunt.initConfig({ banner: '/* <%= BUILD_COMMENT %> */\n' } } + }, + + // -- Watch Config --------------------------------------------------------- + + watch: { + src: { + files: 'src/**/css/*.css', + tasks: ['test', 'default'], + + options: { + interrupt: true + } + } } }); @@ -238,6 +251,7 @@ grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-csslint'); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-compress'); +grunt.loadNpmTasks('grunt-contrib-watch'); grunt.registerTask('default', [ 'clean:build', diff --git a/package.json b/package.json index 435ee9e..b234a74 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "grunt-contrib-concat": "~0.3.0", "grunt-contrib-compress": "~0.5.0", "bower": "~0.9.2", - "grunt-contrib-csslint": "~0.1.2" + "grunt-contrib-csslint": "~0.1.2", + "grunt-contrib-watch": "~0.4.4" } }