1.0.0 • Published 7 years ago

alpha-template-engine-handlebars v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

Alpha template engine - handlebars

Implementation of alpha-template-engine that uses Handlebars.

Usage

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

Constructor options

optiontypedefaultdescription
extensionstring"hbs"extension of template files
templatesDirectorystringundefinedlocation of template files - by default uses current working directory

API

See JSDOC