node package manager



Utility to facilitate adding the same event listeners to each pipe

Pipe Factory Usage

var pipe = gulpPipeUtils.lazyPipeFactory(streamFunction, listeners);

        var gulpPipeUtils = require('gulp-template-pipe-util');
        var onFinish = function () {
        var onError = function () {
        var listeners = {
            'error': onError,
            'finish': onFinish
        var srcFunction = function () {
           return gulp.src('./test/fixtures/dummy');
        var srcPipe = gulpPipeUtils.lazyPipeFactory(srcFunction, listeners);
        var destFunction = function(){
            return gulp.dest('./output');
        var destPipe =  gulpPipeUtils.lazyPipeFactory( destFunction, listeners);

Listeners is a map of with the keys as the event names and either an array of functions or a function as the value ## Default Factories usage

        var gulpPipeUtils = require('gulp-template-pipe-util');
        var defaultFactories = gulpPipeUtils.getDefaultFactories();
        var myPipeStepErrorFunction = defaultFactories.errorFunctionFactory({pipeStep:'myPipeStep'});
        var myPipeStepFinishFunction = defaultFactories.onFinishFunctionFactory({pipeStep:'myPipeStep'});

Use these factories along with lazyPipeFactory!