【发布时间】:2013-10-05 11:31:40
【问题描述】:
我尝试在 node.js 中通过 grunt 运行监视任务,但它对我不起作用(这是我得到的):
$ grunt watch
warning: Maximum call stack size exceeded Use --force to continue.
这是 Gruntfile.js 中 watch 任务的一部分:
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']);
【问题讨论】:
标签: javascript node.js gruntjs grunt-contrib-watch