-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Build is injecting app script files and usemin is not replacing image names in templates. #370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Could you elaborate on your setup? I couldn't reproduce this using the default options on the generator. |
Hmm, usemin should remove everything in those Could you paste your full index.html, as well as the usemin output during the |
Following is console output for usemin. Just to add here if it helps I'd change
This is content of index.html (from client folder and not from dist folder, dist folder index.html is after this).
And this is from
|
Does this happen in a freshly scaffolded project? |
Yes and it was scaffolded on 14th July, 2014 |
I mean if you don't change any files at all before running |
It appears fine on newly scaffold project. No duplicates. so I wonder what might be wrong but it boils down it's not but from generators side. So I am closing this bug and sorry for inconvenience caused. |
I am having same issue with styles and scripts both. my client/index.html
generated dist/public/index.html contains:
If I remove <-- endinjector --> and <-- endinjector --> from client/index.html then its working as expected. |
@vinesh245 Did you find out why the scripts are not removed? I currently experience the same problem.. |
Ok, maybe this is useful for anyone else: Make sure that your source HTML (e.g. index.html) does not mix linefeed styles (unix/windows). Usemin assumes that the lines are separated equally - otherwise block replacement will probably fail. I read that the usemin team plans to migrate from regular expressions to a html parser which would probably solve this issue. |
👍 Awesome @stieler-it ! That really did the trick |
👍 Awesome @stieler-it! Thanks about it!!! I work hard here!!! |
+1 @stieler-it Thank you sir! |
Thanks @stieler-it ! BTW, the configuration in the grunt injector task options is - |
@shairez Thanks!This help me ! |
I had the same problem but with .css files using a Windows machine. Fixed by changing line endings to 'unix' from 'Windows' in Sublime Text 2. |
I had this issue a year ago, I fixed it adding the following option to injector Grunt task:
|
@stieler-it: You are a genius! |
@Awk34 : Thank you, your issue linking helped! 👍 |
While running successful build, controller and other components scripts are injected into index.html.
Also it's is not replacing optimized image names with renamed files in templates or CSS.
The text was updated successfully, but these errors were encountered: