/brjade

Inline jade templates when browserifying

Primary LanguageJavaScript

brjade

A Browserify transform to inline the result of calls to jade.renderFile and jade.render.

Heavily inspired by brfs.

In a script that might or might not be browserified:

var jade = require('jade');

jade.renderFile(__dirname + '/index.jade');

When bundling:

var fs = require('fs');
var browserify = require('browserify');
var brjade = require('brjade');

browserify('index.js')
	.transform(brjade)
	.bundle()
	.pipe(fs.createWriteStream('bundle.js'));