simple-handlebars
npm install simple-handlebars
simple-handlebars is a Handlebars engine designed for simplicity, made for express. It supports partials, multiple extensions(like .hbs
and .handlebars
) and view caching for a maximum performance.
How to Use
var app = ;var hbs = ; app; app;
API
hbs(options)
options:
partials
- an array or a string. If it is a string, reads it as a directory and
extension
- the file extension you're using. Usually .hbs
or .handlebars
. By default uses .hbs
. This property is ignored if you send an array to partials
handlebars
- if you need a different Handlebars implementation. By default uses handlebars
caches
- By default, simple-handlebars only caches if process.env.NODE_ENV is 'production'.
hbs#registerHelper(name, fnc)
Calls InternalHandlebars.registerHelper(name, fnc)
.
var app = ;var hbs = ; var instance = ; instance; app; app;