gulp-seajs-dot2js
v0.0.1
Published
A plugin for Gulp, compiles doT template to .js files
Downloads
4
Readme
gulp-weibo-dot2js
A plugin for gulp, compiles doT template to .js files.
Gulp 扩展,根据 @貘吃馍香 的 grunt-brick-compile-template 迁移而来。为了简单起见,暂时去掉了循环引用判断、include 路径合法性判断等。
Usage
First, install gulp-weibo-dot2js
as a development dependency:
npm install --save-dev gulp-weibo-dot2js
Then, add it to your gulpfile.js
:
var dot2js = require("gulp-weibo-dot2js");
gulp.src("./src/tpl/*.html")
.pipe(dot2js({
}))
.pipe(gulp.dest("./dist"));
API
dot2js(options)
options.tplFunc
Type: String
The template utils module path
模板工具方法文件路径,编译后会在源文件中被 require
进去。
options.compressionSpace
Type: Boolean
Default: false
Compression spaces in template files
是否去除模板里的空格。默认为否。