visionmedia/consolidate.js — pull request #9 by kaisellgren (2012-01-08 15:40:44+00:00)
Title: Added support for Dust (#8)

Added support for Dust rendering: https://github.com/visionmedia/consolidate.js/issues/8

I have not done extensive testing, but works with the examples from their homepage:

**index.dust**
```Hello {name}! You have {count} new messages.```

**Code:**

```javascript
var c = require('consolidate');
c.dust('path/to/index.dust', {"name": "foobar", "count": 5}, function(err, html) {
console.log(html);
});
```

**Output:**
```Hello foobar! You have 5 new messages.```

On a side note, the latest version of Dust does not seem to work with newer Node as it uses require.paths, there's a fork that I used instead: https://github.com/semanticprogrammer/dustjs.git