substack/node-browserify — pull request #169 by techpines (2012-06-12 19:44:13+00:00)
Title: Added jade support

I added jade support to this project.

Let's say your jade templates are in a folder called `templates`, then you could require the compiled javascript functions directly:

var templates = require('./templates');

$('#content").html(templates.home({
messages: messages,
users: users
});

I didn't change that much code. Really, just added the register for the `.jade` extension, and added `Wrap.filename` because jade needs this to render templates with includes.

Consider adding this, I think it is pretty slick. Gives people the ability to easily use the same templates on the client and server. And it should be good performance since the jade compilation is occurring on the server side.