gruntjs / grunt-init

Generate project scaffolding from a template.
http://gruntjs.com/project-scaffolding
MIT License
194 stars 59 forks source link

Ignore {% %} patterns #80

Open dschien opened 10 years ago

dschien commented 10 years ago

Hi,

I'd like to be able to specify the regexp for substitutions. Currently, I'm using {%= %}. Eg. {%= name %} I would expect that any other pattern is ignored. However, {% name %} will be replaced by the empty string - not at all what I expected.

This is the result of a quick test:

{%= name %}
{% name %}
{{% name  %}}
<%= name %>

will be replaced by

MyProject

{}
<%= name %>

The second and third line don't seem to be right. They should be ignored.

The original use case I had was scaffolding django templates, that also use the {% %} syntax. So, I'd like to be able to ignore those completely.

Any idea how to do that?