connect-assets-jade

Expose your jade views in the browser using connect-assets.

connect-assets-jade

Expose your jade views in the browser using connect-assets.

$ npm install connect-assets-jade

See example app in /example directory.

Integration with connect-assets is done like so:

var express = require('express')
  , assets = require('connect-assets')
  , jadeAssets = require('../') // <-- here 
  , PORT = 3000;
 
var app = express.createServer();
app.configure(function(){
  app.set('views', __dirname + '/views');
  app.set('view engine', 'jade');
  app.set('view options', {layout: false});
 
  app.use(assets({
    jsCompilers: jadeAssets() // <-- and here 
  }));
 
  app.use(app.router);
});
 
app.get('/', function(reqres){
  res.render('home');
});
 
app.listen(PORT, function(){
  console.log('Example app for connect-assets-jade running on port %d.', PORT);
});

MIT License

Troy Goode (troygoode@gmail.com)

Trevor Power for identifying how to use connect-assets' jsCompilers configuration option. Mike Ball for pointing me in the direction of this approach.