Hacker News new | ask | show | jobs
by v13inc 4613 days ago
I'm really excited to check out this Nunkucks project. I ended up evaluating a bunch of JS Jinja-style libraries and also ended up choosing SWIG.

Unfortunately, SWIG does not run well in the browser. The code is converted with Browserify, and the browser tests only cover the simplest use cases of the library. Thinks broke down horribly as soon as you used a tag ({% extends %}, {% include %}) that needs to load a template.

Is the browser a first-class citizen with Nunjucks? I'd like a library that supports 100% of the features (including compiling templates) in the browser.

1 comments

Absolutely. We run 100% of the tests in the browser, and you can run them by going here: http://jlongster.github.io/nunjucks/files/tests/browser/

If you want to optimize in production, there is advanced support for precompiling your templates as well: http://jlongster.github.io/nunjucks/api.html#precompiling