Negligible Psychological Misery

    This package has been deprecated

    Author message:

    Please use the nunjucks-filters package instead

    byline-nunjucks

    0.1.9 • Public • Published

    byline-nunjucks

    Build Status Code Climate

    Nunjucks environment and filters

    Installation

    npm install --save byline-nunjucks
    

    Usage

    Simply require it in your app.js file

    var app = require('express')(),
      nunjucks = require('byline-nunjucks')();
     
    app.engine('nunjucks', nunjucks);

    Preserving the environment

    If you want to preserve your nunjucks environment, you can pass it through

    var nunjucks = require('byline-nunjucks')(env);

    Custom Filters

    Byline-nunjucks returns its nunjucks environment, so you can easily add your own filters and globals.

    var env = require('byline-nunjucks');
     
    // add a filter
    env.addFilter('emoji', function () {
      return '(⌐■_■)';
    });
     
    // add a global
    env.addGlobal('coolDude', 'Nelson Pecora');

    Keywords

    none

    Install

    npm i byline-nunjucks

    DownloadsWeekly Downloads

    6

    Version

    0.1.9

    License

    MIT

    Last publish

    Collaborators

    • avatar
    • avatar