0.2.0 • Published 8 years ago
browserify-dustjs v0.2.0
browserify-dustjs

browserify transform for dust template files
Install
npm install browserify-dustjs --save-dev
Use
var template = require("../views/template.dust");
template({title:"Browserify is Awesome!", mood:"happy"}, function(err, html) {
// Deal with html
});
template(function(err, html) {
// Also works without context
});
Transform
To use it from the command line:
browserify -t browserify-dustjs file.js
To use it from node:
var browserify = require('browserify');
var dustify = require('browserify-dustjs');
var b = browserify();
b.add('view.js');
b.transform(dustify);
b.bundle().pipe(process.stdout);
Note that by default browserify-dustjs
transforms only .dust
and .html
files. You can add more extensions:
...
// transform `.dust`, `.html`, and `.tpl` files
b.transform(dustify.configure('.tpl'));
...
or specify all extensions:
...
// transform only `.dust` and `.tpl` files
b.transform(dustify.configure(['.dust', '.tpl']));
...
or both:
...
// transform only `.dust`, `.tpl`, and `.xyz` files
b.transform(dustify.configure(['.dust', '.tpl']).configure('.xyz'));
...
0.2.0
8 years ago
0.2.0-beta.2
9 years ago
0.2.0-beta.1
9 years ago
0.2.0-beta.0
9 years ago
0.1.1
10 years ago
0.1.0
10 years ago
0.0.5
10 years ago
0.0.4
11 years ago
0.0.3
11 years ago
0.0.2
11 years ago
0.0.1
11 years ago
0.0.0
11 years ago