Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1.1 KB

.verb.md

File metadata and controls

42 lines (29 loc) · 1.1 KB

Heads up!

There were major breaking changes in v1.0!.

Usage

const handlebars = require('handlebars');
const engine = require('{%= name %}')(handlebars);
console.log(engine);

The engine object that is returned has the following properties:

  • name - the name of the engine: handlebars, used for engine detection in other libraries.
  • instance - your instance of handlebars
  • compile - async compile method
  • compileSync - sync compile method
  • render - async render method
  • renderSync - sync render method

API

{%= apidocs("index.js") %}

Release History

v1.0.0

  • The main export is now a function that takes an instance of handlebars.
  • renderFile and __express have been removed.
  • .compile and .render now return a promise.
  • .compileSync and .renderSync may be used for sync operations.
  • All methods now expect a file object with a .contents property (string or buffer).

v0.8.0

  • renderFile now expects a [vinyl][] file.
  • The old renderFile method is now exposed on engine.__express

v0.7.0

  • updated to handlebars 0.4.0