gulp-freemarker-xmllein
- (只修改了按需编译,不是每次都全局编译)freemarker plugin for gulp
- 注意:在修改include 进来的公共文件不会编译,所以只能修改非公共页面来达到公共文件修改查看(有点绕口)
Usage
First, install gulp-freemarker-xmllein
as a development dependency:
npm install --save-dev gulp-freemarker-xmllein
Then, add it to your gulpfile.js
:
var freemarker = ; gulp ;
You should provide mock files, which type is json:
-
file
is relative toviewRoot
, gulp-freemarker-xmllein will read and process${viewRoot}/${file}
file. -
data
is the data model the template required.
API
freemarker(options)
options.viewRoot
Type: String
Required: true
The directory where all templates files in.
options.options
Type: Object
Default: {}
Options for Freemarker.js. see also https://github.com/ijse/freemarker.js#configurations.