visionmedia/ejs — Issue #36: Stringify a Template / Production-ready code
Author: clintandrewhall
Created: 2011-12-14 06:40:53+00:00
State: open

We have a use-case where we'd want ejs templates compiled into a function string, rather than into a function. This would allow us to assign the template result to a namespace and ship a collection of templates without including ejs as a dependency.

In addition, these types of compiled formats shouldn't include line numbers or rethrow functionality.

This would be supported through two attributes on the options object: stringify and production.

I've taken a first crack at implementing these features into a fork:

https://github.com/clintandrewhall/ejs

I'd love your opinion on this, and if this is a good start to this functionality? If it's appropriate, I'll continue working on it as a pull request.

Thanks!