storify/jade-browser — pull request #4 by destos (2011-12-20 22:47:48+00:00)
Title: Adding noCache to help with development + updating dependencies.

Includes @arlolra's update to make compatible with newer jade versions.

The need for this change came about because I use nodemon to prevent node for restarting by ignoring my views directory. This prevents the exposed jade template file on the front end from becoming updated on a refresh so I tracked down the issue and came up with this little fix.

All that needs done in your server.js/app.js is to create a configure block to only use noCache in development.

``` javascript
app.configure('development', function() {
return app.use(require('jade-browser')('/js/jade.js', '**.jade', {
root: path.resolve(viewsDir, 'templates'),
namespace: 'appviews',
minify: false,
noCache: true
}));
});
```