0.0.1 • Published 10 years ago

component-build-handlebars v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

component-build-handlebars

A component (v1.0.0+ only) builder plugin for Handlebars template pre-compilation.

Installation

npm i --save component-build-handlebars

Usage

NOTE: There are 2 places that require your attention. First, you need to add the plugin to the builder. Second, you need to add the Handlebars runtime to your build.js. (either that, or include it on your page via another <script> tag)

var handlebars = require("component-build-handlebars");

// ...

// add the plugin to the builder
builder.use("templates", handlebars({
    // options for Handlebars.precompile here, but you usually don't need any
}));

// ...

// add the runtime to your build (it's an assumed global)
builder.scripts(function (err, js) {
    // ...
    write("build.js", handlebars.runtime + js);
});