Closed Hotell closed 8 years ago
Can you run grunt build --verbose
and (hopefully) see what usemin is generating for the concat
task? That'll help immensely! (usemin usually spits out the generated config when ran)
Sure, here it is Oh and btw ( I'm on Windows machine ) thanks
concat:
{ generated:
{ files:
[ { dest: '.tmp\\concat\\styles\\vendor.css',
src: [ 'app\\bower_components\\bootstrap\\dist\\css\\bootstrap.css' ] },
{ dest: '.tmp\\concat\\styles\\main.css',
src: [ '{.tmp,app}\\styles\\main.css' ] },
{ dest: '.tmp\\concat\\scripts\\vendor.js',
src:
[ 'app\\bower_components\\angular\\angular.js',
'app\\bower_components\\angular-resource\\angular-resource.js',
'app\\bower_components\\angular-cookies\\angular-cookies.js',
'app\\bower_components\\angular-sanitize\\angular-sanitize.js',
'app\\bower_components\\angular-route\\angular-route.js',
'app\\bower_components\\angular-bootstrap\\ui-bootstrap-tpls.js' ] },
{ dest: '.tmp\\concat\\scripts\\scripts.js',
src:
[ '{.tmp,app}\\scripts\\app.js',
'{.tmp,app}\\scripts\\controllers\\main.js' ] } ] } }
uglify:
{ generated:
{ files:
[ { dest: 'dist\\scripts\\vendor.js',
src: [ '.tmp\\concat\\scripts\\vendor.js' ] },
{ dest: 'dist\\scripts\\scripts.js',
src: [ '.tmp\\concat\\scripts\\scripts.js' ] } ] } }
cssmin:
{ generated:
{ files:
[ { dest: 'dist\\styles\\vendor.css',
src: [ '.tmp\\concat\\styles\\vendor.css' ] },
{ dest: 'dist\\styles\\main.css',
src: [ '.tmp\\concat\\styles\\main.css' ] } ] } }
ah HA! So, two things are at play here. My path lookup is expecting scripts/scripts.js
and you're on Windows.
The second may be the optional paths ({.tmp,app}
), but I won't know for sure.
Have you tried changing it to scripts\scripts.js
or scripts\\scripts.js
, since you're on Windows? That may fix it.
yay! you're da man :) works, maybe you should put that in docs for other windows users or fix it to resolve the path without this win hack.
many thanks
Very good point! Which one worked? \
or \\
?
of course double back slash \\
if it would be just one it would just escape the next character.
so scripts\script.js
would be interpreted like scriptscriptjs
thanks again.
totally unrelated, @Hotell whats your workflow when you serve app locally? Do you need to reference template.js in index.html?
Closing this, I think it is resolved
Having the same issue on windows machine, changing to double backslash didn't fix it either
resolved this issue. Looks like I was missing <!-- endbuild -->
in the js section of index.html
Please recheck the same. Hope it solves the problem :)
Hi, trying to append templates to final script file via usemin option but it doesn't work:
(I'm using Yeoman)
Here is HTML snippet
Gruntfile:
when running task:
grunt throws this error: