Nunjucks - You've been looking for a more sophisticated templating engine for JavaScript. Here it is

added by JavaScript Kicks
10/13/2014 1:13:43 PM

325 Views

Rich Powerful language with block inheritance, autoescaping, macros, asynchronous control, and more. Heavily inspired by jinja2; Fast & Lean High-performant. Small 8K gzipped runtime with precompiled templates in the browser; Extensible Crazy extensible with custom filters and extensions; Everywhere Available in node and all modern web browsers, with thorough precompilation options


1 comments

Drew Peterson
10/14/2014 2:23:01 AM
Wow, I think calling this a templating engine is selling it short. I'd say it's a full blown view engine. The ability to add your own tags is just awesome, and template inheritance and composition is definitely something outside the norm for simple view engines. I have a few intranet sites currently using DotLiquid to generate email html emails on the server side - but that lacks things like template inheritance that I would normally get with full-blow razor views. I may try whipping up a quick node app just for sending emails so that I can take advantage of the template inheritance for my html emails.