npm

Need private packages and team management tools?Check out npm Orgs. »

connect-nunjucks

3.0.0-alpha.4 • Public • Published

connect-nunjucks

this middleware is based on the browser-sync-nunjucks package.

nunjucks works with expressjs out of the box, but we wanted to use the module as a middleware for browser-sync - so here you go.

Example use

var nunjucksMiddleware = require('connect-nunjucks');
 
express.use(
  nunjucksMiddleware({
    baseDir: 'src',
    // default extension if non is supplied
    ext: '.html',
    // possible debug values: true, false, 'browser', 'console'
    debug: true,
    // custom nunjuck filters
    filters: require('./custom-filters'),
    context: {
      dataInTemplates: {
        value1: 'whatever'
      }
    }
  })
);
 

install

npm i connect-nunjucks

Downloadsweekly downloads

21

version

3.0.0-alpha.4

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability