I have a grunt setting to compile all my coffee files in javascript and support all folder structures using dynamic_mappings, which works fine.
coffee: { dynamic_mappings: { files: [{ expand: true, cwd: 'assets/scripts/src/', src: '**/*.coffee', dest: 'assets/scripts/dest/', ext: '.js' }] } }
What I would like to do is use the clock to compile any modified coffee file and maintain the folder structure. This works using the above task with this task:
watch: { coffeescript: { files: 'assets/scripts/src/**/*.coffee', tasks: ['coffee:dynamic_mappings'] } }
The problem is that when one file changes, it again compiles the entire coffee directory in Javascript, it would be great if it only compiles the only coffee file that has been changed to Javascript. Is this possible in Grunt or is it a regular feature. The key point here is that it must support the folder structure, otherwise it would be easy.
We have custom clock scripts at work, and I'm trying to sell them on Grunt, but for this you need this function.
James billings
source share