I'm using ejs as part of a compilation process to concat some JS together and now, I'd like to use it to slurp in some templates as JS variables.
I'm not sure if this needs new syntax, or re-using the existing newline slurping syntax makes sense for includes. What I did felt like a bit of a hack, but it worked.
The idea is that with this you can do:
var foobar = '<% include foobar.tpl -%>';
and it'll slurp all the newlines from the included file.
Slurp newlines from includes
Hmm, I already use the slurp on includes to fix the whitespace generated by the include line.
This would break that :/
Why not slurp everything in the include file?
Sure, perhaps some new syntax / filter support for includes makes sense then.
Slurping in the entire file, newlines and all, won't allow you to store it off in a variable, you'll end up with:
var foobar = '<div>
remove extra linebreaks ref issues #87 and possibly #88