1602/compound — pull request #308 by mghayes (2012-12-30 09:25:44+00:00)
Title: Add new configuration options to AssetsCompiler

New configuration options that allow the compilers in AssetsCompiler
to be configured without modifying the AssetsCompiler filer directly.
This also allows you to easily add new compilers.

This is just a first attempt. Does this seem like a good way to
configure the compilers?

Then you can do something like this in the environments file:

module.exports = function (compound) {

var express = require('express'),
app = compound.app,
roots_css = require('roots-css');

app.configure(function(){
app.use(compound.assetsCompiler.configure('stylus', {
use: roots_css()
}).init());
app.use(express.static(app.root + '/public', {maxAge: 86400000}));
app.set('view engine', 'ejs');
app.set('view options', {complexNames: true});
app.set('jsDirectory', '/javascripts/');
app.set('cssDirectory', '/stylesheets/');
app.set('cssEngine', 'stylus');
app.use(express.bodyParser());
app.use(express.cookieParser('secret'));
app.use(express.session({secret: 'secret'}));
app.use(express.methodOverride());
app.use(app.router);
});

};

Or you could do these configurations in an initializer.