A memoized server-side precompiler for dustjs.
dust-partials-middlware is a simple middleware package that allows you to compile and memoize dustjs partials provided to the client, as opposed to commandline compiling them. Assuming the memoization library is competent (currently, I'm using memoizee for this), the performance difference should be negligible.
dust-partials-middleware uses a few open source projects:
- dustjs-linkedin - The mature linkedin fork of the dustjs environment
- memoizee - A decent memoization library.
//Eventually, when published!npm install dust-partials-middleware
var dust_partials = require('dust-partials-middleware');app.use('/partials',dust_partials(__dirname,'/views'));
Free Software, Fuck Yeah!