npm.io
1.1.0 • Published 11 years ago

dotify

Licence
MIT
Version
1.1.0
Deps
3
Vulns
1
Weekly
0
Stars
2

Dotify

Browserify transform plugin for doT.js.

Installation

npm install dotify

Usage

In main.js:

var tpl = require('./template.dot');

var output = tpl({ message: 'Hello World!' });
console.log(output);

Then compile the scripts:

$ browserify -t dotify main.js

You can also pass options to the doT.js compiler, for example to preserve whitespace:

$ browserify -t [ dotify --no-strip ] main.js

License

MIT

Keywords