cgross / generator-cg-angular

Yeoman generator for Enterprise Angular projects.
MIT License
592 stars 198 forks source link

Favicon being removed from <head> during build #56

Closed Jakobovski closed 10 years ago

Jakobovski commented 10 years ago

I adding a favicon to the <head> of index.html. Unfortunately it is being removed on grunt build.

bwinchester commented 10 years ago

That's probably being removed by grunt contrib htmlmin. https://github.com/kangax/html-minifier#options-quick-reference . You can wrap that element with comment. There is also a likely more elegant option in that lib like others that allow regex ignores of attributes like the update task has remove: ['script[data-remove!="false"]','link[data-remove!="false"]'], where scripts and links with data-remove="false" would not remove the tag from your index page.

Jakobovski commented 10 years ago

The favicon was being removed by dom_munger.update. Your solution of adding a data-remove!="false"to the element worked. Thanks!