0.2.0 • Published 8 years ago

gulp-lodash-template v0.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

gulp-lodash-template

gulp插件,将lodash模板文件预编译成function,支持JST、AMD和CommonJS输出

Precompile lodash.template to a function.

Install

npm install gulp-lodash-template --save-dev

Example

gulpfile.js

var template = require('gulp-lodash-template');

gulp.task('tmpl', function() {
  return gulp.src('./tmpl/*.html')
    .pipe(template({
      commonjs: true,
      // amd: true,
      strict: true
    }))
    .pipe(gulp.dest('./tmpl/'));
});

template(options)

options

Type: Object

options.strict

Type: Boolean Default: false

Add use strict; at the first line of the compiled template function.

options.es6module

Type: Boolean Default: false

options.commonjs

Type: Boolean Default: false

options.amd

Type: Boolean Default: false

options.namespace

Type: String Default: 'JST'

0.2.0

8 years ago

0.1.0

9 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago