ecofy
eco precompiler plugin for Browserify without magic.
Compiles Handlebars templates to plain Javascript. The compiled templates only have one copy of the Handlebars runtime so they are lightweight and fast!
Usage
Install hbsfy locally to your project:
npm install ecofy
Handlebars will be automatically installed as [peer dependency][].
Then use it as Browserify transform module with -t
:
browserify -t eco main.js > bundle.js
where main.js can be like:
var template = ;documentbodyinnerHTML = ;
and template.hbs:
Hello <%=name%>!
Programmatic usage
When compiling using Javascript code custom extensions can be set:
var ecofy = ; var browserify = ;var b = ;b;b;