Answer the question
In order to leave comments, you need to log in
How to replace text in templates in grunt?
Good afternoon.
I also use grunt
it grunt-preprocess
to convert static html.
Tell me what plugins can I use to replace part of the text during assembly? grunt-preprocess
and directives <!-- @if NODE_ENV='prod' -->
do not fit - because I plan to replace it with a text from the database (once a day) and conditional constructions will be useless.
Answer the question
In order to leave comments, you need to log in
grunt has its own templating system, with conditionals and loops.
gruntjs.com/api/grunt.template
you can use grunt-contrib-copy and add a handler for each file that will compile the template.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question