Should be pipe-able in a gulp chain, and the task helper should allow optional dependencies
Closed this issue · 1 comments
DesignByOnyx commented
The library should be able to sit in between gulp.src
and gulp.dest
streams - just like other gulp plugins:
var compiler = require('can-compile/gulp');
gulp.task('cancompile', function () {
return gulp.src('path/to/templates')
.pipe( compiler('views.production.js') )
.pipe( gulp.dest('path/to/dist') );
});
Also, the .task
helper should allow for optional dependencies (notice [clean]
):
var compiler = require('can-compile/gulp');
compiler.task('cancompile', {
version: '2.2.7',
src: 'glob/to/source/*/**'
out: 'path/to/dest/views.templates.js'
}, gulp, ['clean']);
Dbuggerx commented
+1 that would be perfect!