connect-assets-jade

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

npm install connect-assets-jade
1 downloads in the last week
73 downloads in the last month

connect-assets-jade

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

build status

Tips are welcome, but not expected.

Installation (via npm)

$ npm install connect-assets-jade

Usage

See example app in /example directory.

Integration with connect-assets is done like so:

var express = require('express')
  , assets = require('connect-assets')
  , jadeAssets = require('connect-assets-jade') // <-- 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: {
      jade: jadeAssets() // <-- and here
    }
  }));

  app.use(app.router);
});

app.get('/', function(req, res){
  res.render('home');
});

app.listen(PORT, function(){
  console.log('Example app for connect-assets-jade running on port %d.', PORT);
});

Credits

License

MIT License

Author

Troy Goode (troygoode@gmail.com)

npm loves you