I am new to gruntjs and here is my simple 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');
};
When I run grunt it compiles fine. However, when I run grunt watch, it's just waiting and not detecting my changes.
You should add files to watch:
watch: {
coffee: {
files: ['js/coffeescript/*.coffee'],
tasks: 'coffee'
}
}
From example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With