Node xTemplate
A node.js wrapper around xtemplate engine
Install
$ npm install --save node-xtemplate
Usage
demo.xtpl
{{ message }}
demo.js
const xTemplate = // callbackxTemplate // or promisexTemplate
API
render(path, data[, options], callback)
path
Type: string
The path of template file.
data
Type: object
The template data.
options
extname
Type: string
strict
Type: boolean
catchError
Type: boolean
cache
Type: boolean
encoding
Type: string
Default: utf-8
callback(err, result)
Type: function
Done callback