ejs icon indicating copy to clipboard operation
ejs copied to clipboard

ejs.parse function ??

Open sahanDissanayake opened this issue 11 years ago • 1 comments

Hi I'm trying to remove all whitespace and line breaks on my .ejs templates on production.

Does anyone know how to do this the best way ?

I will use a grunt task to minify the .ejs template

@tj

sahanDissanayake avatar Oct 29 '14 20:10 sahanDissanayake

The best way to do this is through an external module, because ejs doesn't know when line breaks are required (e.g. in <pre>) and when they aren't. https://www.npmjs.com/search?q=html+minifier should get you started.

TimothyGu avatar Jan 24 '15 20:01 TimothyGu