我是新來gruntjs,這裏是我的簡單gruntfile:使用gruntjs,如何監視.coffee文件中的更改?
/* global module:false */
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
watch: {
tasks: 'coffee'
},
coffee: {
compile: {
files: {
'js/javascript/*.js': ['js/coffeescript/*.coffee'] // 1:1 compile
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-coffee');
// Default task.
grunt.registerTask('default', 'coffee');
};
當我運行咕嚕它編譯罰款。但是,當我運行grunt watch時,它只是在等待,沒有檢測到我的更改。
你試圖定義 「...任務: '咖啡-w' ......」? – robkuz