Module bauplan.templates

Templates

Loads and compiles template files for use by Handlebars

Returns

BauplanTemplates

Type
instance

Requires

  • handlebars
Source:

Methods

load(templates, callback)

Load template files for app

Parameters
Name Type Description
templates object

Template path key/value pairs

callback function
Source:

(inner) callback(templates) → {object}

Parameters
Name Type Description
templates object

Object of compiled templates

Source:
Returns

Compiled templates

Type
object

(inner) filterTemplate(template) → {function}

Turns controls into view helpers

Parameters
Name Type Description
template string

Raw template string

Source:
Returns

Filtered template string

Type
function

(inner) processValue(value, bundle) → {function}

Filters template and compiles string

Invoked by bauplan.require

Parameters
Name Type Description
value string

Template string

bundle object
bundle.​key string
bundle.​keys array
bundle.​value string
Source:
Returns

Compiled template

Type
function