Looking for the right regular expression(s) to mirror the folder structure from "app" to the "dist" folder.
E.g. app/components/search/a.html app/components/search/b.html etc.
To: dist/components/search/a.html dist/components/search/b.html etc.
My current grunt htmlmin entry:
htmlmin: {
dist: {
options: {
collapseWhitespace: true,
collapseBooleanAttributes: true,
removeCommentsFromCDATA: true,
removeOptionalTags: true
},
files: {
'<%= yeoman.dist %>/components/search' : '<%= yeoman.app %>/components/search/**/*.html'
}
}
},
Have tried several other combinations unsuccessfully.
Turns out there is a pretty decent template for doing this in the Grunt file that Yeoman generate for Angular.
The yeoman generator directory style isn't quite what I wanted, so the default doesn't work. I've amended it to fit my needs.
My solution: