koa-xtpl
A node.js wrapper around xtemplate engine (easier for Koa 2)
Install
# npm $ npm install koa-xtpl --save# or yarn $ yarn add koa-xtpl
Usage
demo.xtpl
{{ title }}
demo.js
const path = const Koa = const xtpl = const app = // rootapp// or optionsapp app app
API
xtpl(options)
options
Type: object
or string
Option or view root directory
root
Type: string
commands
Type: object
extname
Type: string
catchError
Type: boolean
encoding
Type: string
Default: utf-8
strict
Type: boolean
cache
Type: boolean