slushjs / slush

The streaming scaffolding system - Gulp as a replacement for Yeoman
http://slushjs.github.io/generators
MIT License
1.24k stars 58 forks source link

Escape template var syntax #60

Closed Zeindelf closed 5 years ago

Zeindelf commented 6 years ago

How can I escape variables call in templates? I need <%= someVar %> syntax for iconfont generate into SASS file.

no-more commented 6 years ago

Hello, did you find the solution ?

Zeindelf commented 6 years ago

Yep. I change <%= someVar %> to <%- someVar %> (dash to not escape < and >), and on main file, create a prop with same name with a string value someVar = '<%= fontName %>'