私は gruntjs が初めてで、これが私の単純な gruntfile です。
/* 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 を実行すると、正常にコンパイルされます。ただし、grunt watch を実行すると、待機しているだけで、変更が検出されません。