mde/ejs

Add a precompile step

terrablue opened this issue · 3 comments

Hi, is it possible to add a precompilation step like handlebars'? Such that it's possible to compile .ejs files once to JS, and then render them with different data.

As far as I can see, that would be pretty similar to ejs.compile, except that instead of constructing a function to be executed on the fly, the source code would be returned so that it can be saved to disk.

I don't mind submitting a PR if the idea is generally favored.