diff --git a/index.js b/index.js index 9d33ad3..f1c4d8a 100644 --- a/index.js +++ b/index.js @@ -32,10 +32,11 @@ var forEach = function (file, enc, cb) { //tell gulp that we are complete return cb(null, file); }; -var atEnd = function () { +var atEnd = function (cb) { if (gulpCallFunction.executionMode == "atEnd") { runFunctionNames(); } + cb(); }; module.exports = function (functionsToExecute, executionMode, logBool) { if (executionMode === void 0) { executionMode = 'forEach'; } diff --git a/ts/index.ts b/ts/index.ts index 5802d19..7ead9c2 100644 --- a/ts/index.ts +++ b/ts/index.ts @@ -33,10 +33,11 @@ var forEach = function (file, enc, cb) { return cb(null, file); }; -var atEnd = function() { +var atEnd = function(cb) { if (gulpCallFunction.executionMode == "atEnd") { runFunctionNames(); } + cb(); }; module.exports = function (functionsToExecute:any|any[],executionMode:string = 'forEach', logBool = false) { gulpCallFunction.functionsToExecute = functionsToExecute;