Reputation: 4271
i'm using yeoman
as tool for mantaining the app organized. Since i've many directives i did not use the standard way the yeoman
generate the directive, thus scripts/directive/name.js
for the code and views/template_directive.html
for the template.
I instead did this:
scripts/directive/my-directive
and inside i've the js
and html
file.
here a screenshot
Now, when i serve
everything works well, the problem araises when i run the build
. the js
of the directives ends up in the vendor.js
but the html page still points to scripts/directive/my-directive/template_directive.html
which is not part of the dist.
What I should (probably, if there's better options more than welcome) do is:
html
in the view folderor
html
files in the same folder also for the dist (recreate all the /directives/<directive>/<template>.html
)the question is:
Upvotes: 0
Views: 127
Reputation: 4271
I did like this (not sure if it's "correct" but works)
add this in the copy
section
..
{
expand: true,
dot: true,
cwd: '<%= yeoman.app %>/scripts/directives',
src: ['*/*.html'],
dest:'<%= yeoman.dist %>/scripts/directives'
}
..
add this to the minhtml
conf
files: [{
...
src: [..,'scripts/directives/*/*.html'],
...
}]
Upvotes: 1