grunt watch
This commit is contained in:
parent
15192f33bd
commit
2e4964d675
22
Gruntfile.js
22
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']);
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue