optimizer-jade
RaptorJS Optimizer plugin to support compilation of Jade templates
Last updated 5 years ago by pnidem .
Apache License v2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install optimizer-jade 
SYNC missed versions from official npm registry.

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);
    });

Current Tags

  • 1.1.5                                ...           latest (5 years ago)

3 Versions

  • 1.1.5                                ...           5 years ago
  • 1.1.4                                ...           5 years ago
  • 1.1.3                                ...           5 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 3
Dependencies (1)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |