Implementation of alpha-template-engine that uses Handlebars.
import {HandlebarsTemplateEngine} from 'alpha-template-engine-handlebars';
const engine = new HandlebarsTemplateEngine();
// loads template.hbs and renders it
engine.renderTemplate('template', {name: 'alpha'})
.then(result => {
result; // Hello alpha!
});
option | type | default | description |
---|---|---|---|
extension | string | "hbs" | extension of template files |
templatesDirectory | string | undefined | location of template files - by default uses current working directory |