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