gulp-mew-template

0.0.5 • Public • Published

gulp-mew-template

Install

npm i -D gulp-mew-template

Usage

var gulp = require('gulp');
var notify = require('gulp-notify');
var clean = require('gulp-clean');
var template = require('mew-template');
 
gulp.task('clean', function() {
    return gulp.src('test/dest')
        .pipe(clean());
});
 
gulp.task('template', ['clean'], function() {
    gulp.src('test/tpl/dot.tpl')
        .pipe(template({
            engine: 'dot',
            syntax: '<%%>'
        }))
        .on('error', notify.onError({
            title  : 'Template Error in <%= error.filepath %>',
            message: '<%= error.stack %>'
        }))
        .pipe(gulp.dest('test/dest'));
 
    gulp.src('test/tpl/handlebars.tpl')
        .pipe(template({
            engine: 'handlebars'
        }))
        .pipe(gulp.dest('test/dest'));
 
    gulp.src('test/tpl/jst.tpl')
        .pipe(template({
            engine: 'jst'
        }))
        .pipe(gulp.dest('test/dest'));
 
    gulp.src('test/tpl/xtemplate.tpl')
        .pipe(template({
            engine: 'xtemplate'
        }))
        .pipe(gulp.dest('test/dest'));
});
 
gulp.task('default', ['template']);
 

Readme

Keywords

Package Sidebar

Install

npm i gulp-mew-template

Weekly Downloads

1

Version

0.0.5

License

MIT

Last publish

Collaborators

  • l3au