New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

nunjs

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nunjs

Nunjucks wrapper, adds Jinja2 engine for Sails/Express in a simplest way.

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

nunjs

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 - ejs and 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.

Important!

This module is a patch for sails.js version 0.9.4 and earlier. For newest versions, you can fully use consolidated nunjucks module

Install

Basic

$ npm install nunjs 

From GitHub

$ npm install git://github.com/rootStar-lock/nunjs.git

Usage

It is simple, very simple. Just install and config your app.

Express

Add/change your app.js file like:

app.set('views', __dirname + '/views');
app.set('view engine', 'nunjs');
app.use(express.favicon());

Sails

Change your engine option in config/views.js to nunjs

module.exports.views = {
	engine: 'nunjs',
	layout: true //Ingnored. Use extends command http://jinja.pocoo.org/docs/templates/#template-inheritance
}

Next ?

After that add your .nunjs templates in your views folder.

  • nunjucks
  • Jinja 2

Contacts

My own luna park with nuns and chess :) Enjoy

Keywords

express

FAQs

Package last updated on 17 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts