Skip to content

Commit 2e4964d

Browse files
committed
grunt watch
1 parent 15192f3 commit 2e4964d

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

Gruntfile.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module.exports = function(grunt) {
66
grunt.loadNpmTasks('grunt-doctoc');
77
grunt.loadNpmTasks('grunt-contrib-jshint');
88
grunt.loadNpmTasks('grunt-jscs');
9+
grunt.loadNpmTasks('grunt-contrib-watch');
910

1011
grunt.initConfig({
1112
sass: {
@@ -73,6 +74,27 @@ module.exports = function(grunt) {
7374
jscs: {
7475
all: ['*.js', 'src/*.js', ],
7576
},
77+
78+
watch: {
79+
scripts: {
80+
files: ['src/*.js'],
81+
tasks: ['uglify', 'jshint', 'jscs'],
82+
options: {
83+
},
84+
},
85+
styles: {
86+
files: ['src/*.scss'],
87+
tasks: ['sass', 'cssmin'],
88+
options: {
89+
},
90+
},
91+
docs: {
92+
files: ['README.md', 'doc/README.md'],
93+
tasks: ['doctoc'],
94+
options: {
95+
},
96+
},
97+
},
7698
});
7799

78100
grunt.registerTask('default', ['sass', 'cssmin', 'copy', 'uglify', 'doctoc', 'jshint', 'jscs']);

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"grunt-contrib-cssmin": "^0.14.0",
2727
"grunt-contrib-jshint": "^1.0.0",
2828
"grunt-contrib-uglify": "^0.10.1",
29+
"grunt-contrib-watch": "^0.6.1",
2930
"grunt-doctoc": "^0.1.1",
3031
"grunt-sass": "^1.1.0"
3132
}

0 commit comments

Comments
 (0)