Closed arjunkalburgi closed 6 years ago
Grunt has a separate template engine, which parses your Gruntfile. So if you have a template string in your grun file with <%= newTheme %> grunt itself will try to replace that. Is not the processhtml plugin doing this.
You could write your template in an html file, and read it in your gruntfile with fs.writeFileSync to prevent Grunt try to replace your template literal.
I want to add a line to my html file, and retain the ability to add another line.
So what I've done in my grunt is:
Where themelink is:
The problem is processhtml tries to work recursively and attempts to replace the newTheme in themelink string. Naturally there is no other newTheme for it to grab, so I get a
newTheme not defined
warning and thus doesn't run.Edit: The quote/code styles aren't working, sorry for the lame pictures