0.2.0 • Published 5 years ago

@ethronpi/handlebars v0.2.0

Weekly downloads
-
License
-
Repository
bitbucket
Last release
5 years ago

@ethronpi/handlebars

NPM version Total downloads

Ethron.js plugin for the Handlebars template system.

Developed in Dogma, compiled to JavaScript.

Engineered in Valencia, Spain, EU by EthronLabs.

Use

const hbs = require("@ethronpi/handlebars");

hbs.render task

This task renders a Handlebars template:

render({model, tmpl, src, dst}) : string
  • model (object, required). Data object to use.
  • tmpl (string). Template text to render.
  • src (string). Template file to render.
  • dst (string). File to generate if needed.

At least, src or tmpl must be specified.

Example:

hbs.render({
  model: {name: "France 24", website: "france24.com"},
  src: "tv.hbs",
  dst: "france24.json"
});

Available helpers

See @ethronjs/handlebars.

0.2.0

5 years ago