mat-freemarker
v0.0.3
Published
freemarker plugin for mat
Downloads
4
Maintainers
Readme
mat-freemarker
Installation
npm install --save-dev mat-freemarker
Basic Usage
var mat = require('mat')
var freemarker = require('mat-freemarker')
mat.task('freemarker', function() {
mat.url([/\.ftl/])
.use(freemarker({
viewRoot: './template',
dataRoot: './fakeData',
options: {
numberFormat: '0.############'
}
}))
})
Options
- viewRoot: ftl模板目录
- dataRoot: 需要渲染的数据目录,文件名及路径与ftl模板保持一致,保存为
.json
文件 - See the freemarkerjs options