Skip to content
Expose your jade views in the browser using connect-assets.
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
example
lib
test
.gitignore
.npmignore
.travis.yml
LICENSE
README.md
package.json

README.md

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)

Something went wrong with that request. Please try again.