Skip to content

Plugin for Lasso.js that compiles Jade templates to CommonJS modules.

Notifications You must be signed in to change notification settings

lasso-js/lasso-jade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lasso-jade

Plugin for the Lasso.js 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 lasso-jade --save

Enable the plugin:

require('lasso').configure({
    plugins: [
        'lasso-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);
    });

About

Plugin for Lasso.js that compiles Jade templates to CommonJS modules.

Resources

Stars

Watchers

Forks

Packages

No packages published