paularmstrong/swig — pull request #173 by brikou (2013-01-02 15:42:28+00:00)
Title: add set method to allow config extension

The new ``set`` method allow us to extend configuration (in dev mode for example), here is a use case (using expressJS):

``` js
// in production
// ...
swig.init({
root: __dirname + '/views'
});
// ...

app.configure('development', function() {
app.use(express.logger('dev'));
app.use(express.errorHandler());

if (true) { // unless this PR is accepted
swig.init({
root: __dirname + '/views',
allowErrors: true,
cache: false
});
} else {
swig.set('allowErrors', true);
swig.set('cache', false);
}
});