lichunqiang / gulp-tmod

grunt-tmod gulp version
31 stars 8 forks source link
gu gulp tmodjs

gulp-tmod NPM version Build Status Dependency Status

Notice: Please read this issue

tmodjs's gulp version.

Install

$ npm install gulp-tmod --save-dev

Options

Similar to tmodjs options with a bit of difference.

output

Default: false

We use gulp steam other than tmodjs output, so set it to false prevent tmodjs create files.

runtime

Type: String

Default: template.js

This will be use as a path pass to gulp-util File

templateBase

Default: __dirname

Your template basepath.

minify

Minify is deprecated, we should use gulp-uglify

watch

Watch is deprecated, we should use gulp.watch

Usage

var tmodjs = require('gulp-tmod');

gulp.task('default', function(){
    var stream = gulp.src('template/**/*.html')
            .pipe(tmodjs({
                templateBase: 'template'
            }))
            .pipe(gulp.dest('dist'));
    return stream;
});

Test

$ npm test

Changelog

2.0.0

More

See tmodjs

grunt-tmod

Issues should be reported on the tmodjs issue tracker