From 772a071dfe06a1fb34100d602cc75f40da654875 Mon Sep 17 00:00:00 2001 From: Kristof Torfs Date: Thu, 25 Feb 2016 16:37:18 +0100 Subject: [PATCH] Allow to set a callback for bundle.watch() --- lib/stream-bundles-watch.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/stream-bundles-watch.js b/lib/stream-bundles-watch.js index 2f51cfde..b1fef698 100644 --- a/lib/stream-bundles-watch.js +++ b/lib/stream-bundles-watch.js @@ -74,6 +74,7 @@ function _bundle(config, env) { .pipe(gulp.dest(config.options.dest)) .pipe(through.obj(function (file, enc, cb) { bundleDone(prettyScriptsBundleName, start); + if (config.options.callback && typeof(config.options.callback) == 'function') config.options.callback(file); })); }); @@ -110,6 +111,7 @@ function _bundle(config, env) { .pipe(gulp.dest(config.options.dest)) .pipe(through.obj(function (file, enc, cb) { bundleDone(prettyStylesBundleName, start); + if (config.options.callback && typeof(config.options.callback) == 'function') config.options.callback(file); })); });