npm

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

optimizer-jade

1.1.5 • Public • Published

optimizer-jade

Plugin for the RaptorJS Optimizer that compiles Jade templates to CommonJS modules. These templates can easily be rendered using the view-engine module (in conjunction with view-engine-jade).

Installation

npm install optimizer-jade --save

Enable the plugin:

require('optimizer').configure({
    plugins: [
        'optimizer-jade'
    ]
});

You will also need to install view-engine and view-engine-jade:

npm install view-engine --save
npm install view-engine-jade --save

Usage

Enable the Jade view engine:

require('view-engine').register(
    'jade',
    require('view-engine-jade'));

Render templates on the client or server:

var template = require('view-engine').load('./template.jade');
template.render({
        name: 'Frank'
    },
    function(err, output) {
        console.log('Template output: ', output);
    });

install

npm i optimizer-jade

Downloadsweekly downloads

1

version

1.1.5

license

Apache License v2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability