component-build-handlebars

0.0.1 • Public • Published

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);
});

Package Sidebar

Install

npm i component-build-handlebars

Weekly Downloads

2

Version

0.0.1

License

MIT

Last publish

Collaborators

  • dominicbarnes