I use the angular-generator in yeoman. In gruntfile.js, every html file in /app/views
get copied to dist/views
. But I like to keep my directive templates in the same folder as the directive itself.
Example:
/app/scripts/widgets/mywidget.directive.js
/app/scripts/widgets/mywidget.tmpl.html
When I build the project, I want the html file to end up in the same folder structure as above.
This should probably be done in the copy section in gruntfile.js.
copy: {
dist: {
files: [{
expand: true,
dot: true,
cwd: '<%= yeoman.app %>',
dest: '<%= yeoman.dist %>',
src: [
'*.{ico,png,txt}',
'*.html',
'images/{,*/}*.{webp}',
'styles/fonts/{,*/}*.*'
]
}...
I tried to add this in the src array:
'<%= yeoman.dist %>/scripts/{,*/}*.tmpl.html'
Did not work. Any ideas?