Package Exports
- engine-handlebars
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (engine-handlebars) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
engine-handlebars 
Handlebars engine, consolidate.js style but with enhancements. This works with Assemble, express.js, engine-cache or any application that follows consolidate.js conventions.
Install
Install with npm:
npm i engine-handlebars --save-dev
Usage
var handlebars = require('engine-handlebars');
API
.render
Handlebars string support. Render the given str
and invoke the callback cb(err, str)
.
str
{String}options
{Object|Function}: or callback.cb
{Function}: callback function.
var engine = require('engine-handlebars');
engine.render('{{name}}', {name: 'Jon'}, function (err, content) {
console.log(content); //=> 'Jon'
});
.renderSync
Synchronously render Handlebars or templates.
str
{Object}: The string to render.options
{Object}: Object of options.returns
{String}: Rendered string.
var engine = require('engine-handlebars');
engine.renderSync('<%= name %>', {name: 'Jon'});
//=> 'Jon'
.renderFile
Handlebars file support. Render a file at the given path
and callback cb(err, str)
.
path
{String}options
{Object|Function}: or callback function.cb
{Function}: callback function
var engine = require('engine-handlebars');
engine.renderSync('foo/bar/baz.tmpl', {name: 'Jon'});
//=> 'Jon'
Author
Jon Schlinkert
License
Copyright (c) 2014 Jon Schlinkert, contributors.
Released under the MIT license
This file was generated by verb-cli on October 24, 2014.