Task usemin does not work for html templates ending in .mustache
Closed this issue · 3 comments
I just updated to the newest version of node-build-script, and the task usemin stopped to update revved filenames in my view files, as they all end in .mustache. If I update the ending to .html, everything works, but I'd rather have it working as it used, simply using template name ending.
The usemin task has been reworked a bit to be able to handle replacement in other things than html files, mainly for processing CSS files to rename img backgrounds.
But I agree, it should handle other file extensions. Right now, it's based on filename's extension to trigger the corresponding helper. It should do based on the task target (css
, html
and others we might add) instead.
You would just have to list them in the usemin:html
config of your gruntfile:
usemin: {
html: ['**/*.mustache'],
css: ['**/*style.css']
}
Does it sound good to you? Let me know if you had other problem related to template files not ending with .html
I'll try to tackle this asap.
Please, re-open the ticket if you still have problem with the usemin task. 9ea030a should solve this.
Honestly, it should have used the grunt's subtarget name from the beginning, instead of depending on filenames. Thanks again for the report.
I confirm that this works now. Thanks!