gulp-ect
Gulp plugin to compile ect.js template engine
Install with npm
npm install --save-dev gulp-ect
js
var gulp = require('gulp');
var ect = require('ect');
gulp.task('ect', function(){
gulp.src('./src/*.ect')
.pipe(ect())
.pipe(gulp.dest('./out'));
});
gulp.task('default', ['ect']);
coffee
ect = require('ect')
gulp.task 'ect', ->
gulp
.src('./src/*.ect')
.pipe(ect())
.pipe gulp.dest('./out')
gulp.task 'default', ['ect']
Type: String
Default: .ect
The extensions input files.
Type: String
Default: .html
The extensions output files.
Type: Function or Object
Default: {}
The template context data.
If a function is passed, use the format function(fileName,callback) and fire callback as callback(data):
gulp.src(['./src/*.ect', './src/inner/*.ect'])
.pipe(ect({data: function (filename, cb) {
cb({foo: "bar"});
}}))
.pipe(gulp.dest('./out'));
MIT © Vladislav Derjavin dev@vld.me