Browserify tool to transform underscore templates
npm install browserify-underscore-templatetemplates/view.html: <%- text %>
``html`<%- title %>
src/view.js
`javascript
var tpl = require('../templates/test.html');
console.log(tpl({
title: 'Test Title'
text: 'This is test content'
}));
`
cli: This is test content
```
$ browserify -t [ browserify-underscore-templates --extension .html ] ./src/view.js ./templates/test.html > ./views.js
$ node views.jsTest Title
There is an alternative compiler at https://github.com/robrichard/browserify-compile-templates.