I need to add to head in HTML reference to JS and CSS files. How I can add metadata to HTML by grunt? Which plugin should I use and which way?
Asked
Active
Viewed 194 times
1 Answers
1
It really depends on what you already use. I use for similar purposes grunt-file-creator which is really powerful, but you need some knowledge of Node for using it.
If you already use copy
task then you can set up process
function, e.g. like here.
If you use concat
/ uglify
tasks you can use banner
option.
Sorry if the answer is not that clear, but your question is too broad.
-
I using concat/uglify. How I can use baner option when I need only add references to JS and CSS files between and tags? – Cezary Borowy Jul 22 '15 at 16:40
-
well in this case you cannot. Just was thinking you probably adding something to the top of the file – smnbbrv Jul 22 '15 at 16:52
-
So what plugin i should use to do this and how? At example it should searching in directory all JS files and add reference to them to html head. – Cezary Borowy Jul 22 '15 at 18:55
-
@CezaryBorowy I cannot tell anything more. You asked about the direction and what / how to use, this is given in my answer. If you want to have a working code, please start it yourself and post it in your question. – smnbbrv Jul 23 '15 at 07:06