I just started using grunt, and love it. I keep running into an issue that seems like it might be pretty common. Here it is. I have files named so that words after a dot are something like classes. eg:
layout.coffee layout.blog.coffee layout.site.coffee
My grunt task is configured to watch these files and translate them to js like this:
coffee: dev: files: [ expand: true cwd: "<%= yeoman.app %>" src: ["**/*.coffee"] dest: "<%= yeoman.dev %>" ext: ".js" ]
The problem, I think, is that using ext
makes the target for all three .coffee files the destination file layout.js
, which isn't the intention.
Is there a nice way to configure grunt file mapping for filenames with multiple dots?
Right now I have to change my naming convention to use -
instead of .
, which is a drag :(
Note that there is another option "extDot" that you can use to specify after which dot the ext should apply (first or last):
E.g.
files: [{ expand: true, src: ['*.js','!*min.js'], dest: 'js', cwd: 'js', ext: '.min.js', extDot: 'last' }]
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