anyengine

0.0.1 • Public • Published

anyengine

A meta-programming approach to universal templating

API

Engine.configure([options])

Specify default options

Engine.compile(template, [options])

Compiles template string

Engine.compileFile(filename, [options], [callback])

Compiles template file

Engine.render(template, [locals], [options])

Renders template string

Engine.renderFile(filename, [locals], [options], [callback])

Renders template file

Options

Name Type Description
basedir string Specify basedir. Used to resolve partials and data. Defaults to current working dir.
data string Specify directory where to resolve json data.
filename string Specify filename when rendering strings. Used to resolve partials and data.
runtime string|function|object Specify engine runtime, i.e. 'handlebars'. If not specified, it is resolved by filename.
use array Specify middleware, i.e. [ 'frontmatter' ].

Readme

Keywords

none

Package Sidebar

Install

npm i anyengine

Weekly Downloads

1

Version

0.0.1

License

ISC

Unpacked Size

19.4 kB

Total Files

37

Last publish

Collaborators

  • rexblack