diff --git a/Gruntfile.js b/Gruntfile.js index aa843fe..fe102fc 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -6,6 +6,7 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-doctoc'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-jscs'); + grunt.loadNpmTasks('grunt-contrib-watch'); grunt.initConfig({ sass: { @@ -73,6 +74,27 @@ module.exports = function(grunt) { jscs: { all: ['*.js', 'src/*.js', ], }, + + watch: { + scripts: { + files: ['src/*.js'], + tasks: ['uglify', 'jshint', 'jscs'], + options: { + }, + }, + styles: { + files: ['src/*.scss'], + tasks: ['sass', 'cssmin'], + options: { + }, + }, + docs: { + files: ['README.md', 'doc/README.md'], + tasks: ['doctoc'], + options: { + }, + }, + }, }); grunt.registerTask('default', ['sass', 'cssmin', 'copy', 'uglify', 'doctoc', 'jshint', 'jscs']); diff --git a/package.json b/package.json index ca833af..4a4d7e4 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "grunt-contrib-cssmin": "^0.14.0", "grunt-contrib-jshint": "^1.0.0", "grunt-contrib-uglify": "^0.10.1", + "grunt-contrib-watch": "^0.6.1", "grunt-doctoc": "^0.1.1", "grunt-sass": "^1.1.0" }