0.1.0 • Published 6 years ago

@ethronjs/plugin.handlebars v0.1.0

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

@ethronjs/plugin.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("@ethronjs/plugin.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.