From: Jeremy Benoist Date: Tue, 8 Nov 2016 21:16:01 +0000 (+0100) Subject: Add `grunt watch` task X-Git-Tag: 2.1.4~11^2~1 X-Git-Url: https://git.immae.eu/?p=github%2Fwallabag%2Fwallabag.git;a=commitdiff_plain;h=e9490a344376036978956aedeb213066fdbf49e4 Add `grunt watch` task --- diff --git a/Gruntfile.js b/Gruntfile.js index 72a407f9..72473b21 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -189,8 +189,11 @@ module.exports = function (grunt) { }, stylelint: { target: ['<%= appDir %>/themes/material/css/*.css', '<%= appDir %>/themes/baggy/css/*.css'] + }, + watch: { + files: ['<%= appDir %>/**/*.css', '<%= appDir %>/**/*.js'], + tasks: ['css', 'js'] } - }); grunt.registerTask( @@ -221,5 +224,7 @@ module.exports = function (grunt) { 'tests', 'Test css and js style conformity', ['eslint', 'stylelint', 'default'] - ) + ), + + grunt.loadNpmTasks('grunt-contrib-watch'); }; diff --git a/package.json b/package.json index 20afb425..ace74c7f 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,7 @@ "grunt-contrib-copy": "^1.0.0", "grunt-contrib-symlink": "^1.0.0", "grunt-contrib-uglify": "^1.0.0", + "grunt-contrib-watch": "^1.0.0", "grunt-eslint": "^19.0.0", "grunt-postcss": "^0.8.0", "grunt-stylelint": "^0.6.0",