browserify-underscore-templatify
v0.1.0
Published
browserify plugin
Downloads
6
Maintainers
Readme
browserify-underscore-templatify
Plugin for browserify to turn required html files into underscore templates.
Require html files directly from your javascript and use them as compiled templates.
In your browserify bundling code:
browserify = require("browserify");
templatify = require("browserify-underscore-templatify");
bundler = new browserify();
bundler.transform(templatify());
bundler.bundle();
And then in your application:
view = require("index.html");
return view(); //renders the view
options
You can pass in an optional object defining the file extensions to look for when deciding if a file is a template or not:
templatify({ext:['.us-templ']}); //default is ['.html']