From 36368e1f9db05adeccf3cfd347925d659f05d51f Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Mon, 14 Dec 2015 14:01:04 -0600 Subject: [PATCH] don't pass numTasks to bundle --- gulpfile.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index cf0b666b98..794e7e45a5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -176,8 +176,6 @@ function bundle(args) { var webpack = require('webpack'); var path = require('path'); - var numTasks = args.numTasks ? args.numTasks : 0; - webpack(args.config, function(err, stats){ if (args.stats) { var statsOptions = { @@ -190,7 +188,7 @@ function bundle(args) { console.log(stats.toString(statsOptions)); } - if (numTasks === 0 && args.cb) args.cb(); + args.cb && args.cb(); }) } @@ -297,6 +295,7 @@ gulp.task('e2e.bundle', ['e2e.build', 'bundle', 'copy.web-animations', 'sass', ' return glob("dist/e2e/**/index.js", function(err, files){ var numTasks = files.length; + var callback = null; files.forEach(function(file){ var config = require('./scripts/e2e/webpack.config.js'); @@ -310,12 +309,11 @@ gulp.task('e2e.bundle', ['e2e.build', 'bundle', 'copy.web-animations', 'sass', ' libraryTarget: 'commonjs2', filename: path.dirname(file) + '/bundle.js' } - + if (--numTasks === 0) callback = done; bundle({ config: config, - numTasks: --numTasks, stats: false, - cb: done + cb: callback }); }) })