我尝试在node.js中使用Grunt运行"watch"任务,但是它并没有正常工作(这是我的结果):
$ grunt watch
warning: Maximum call stack size exceeded Use --force to continue.
这是Gruntfile.js中观察任务的部分:
watch: {
less: {
files: 'src/less/*.less',
tasks: ['clean', 'recess', 'copy']
},
js: {
files: 'src/js/*.js',
tasks: ['clean', 'jshint', 'concat', 'uglify', 'copy']
},
theme: {
files: 'src/theme/**',
tasks: ['clean', 'recess', 'copy']
},
images: {
files: 'src/images/*',
tasks: ['clean', 'recess', 'copy']
}
}
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('watch', ['watch']);