Nunjucks wrapper, adds Jinja2 engine for Sails/Express in a simplest way.
Sails is great! But it's absolutly unconfigurable. There are only two template engines to choose -
jade. I hate them both. Jinja is simplier and better for me. I'm sure you are lazy like me and prefer to use powerful modules ready-to-use, without voodoo practices.
This module is a patch for sails.js version 0.9.4 and earlier. For newest versions, you can fully use consolidated nunjucks module
$ npm install nunjs
$ npm install git://github.com/rootStar-lock/nunjs.git
It is simple, very simple. Just install and config your app.
Add/change your app.js file like:
engine option in config/views.js to
moduleexportsviews =engine: 'nunjs'layout: true //Ingnored. Use extends command
After that add your
.nunjs templates in your views folder.
- Email: email@example.com
My own luna park with nuns and chess :) Enjoy