don't pass numTasks to bundle

This commit is contained in:
Tim Lancina
2015-12-14 14:01:04 -06:00
parent 1df9b32b38
commit 36368e1f9d

View File

@ -176,8 +176,6 @@ function bundle(args) {
var webpack = require('webpack'); var webpack = require('webpack');
var path = require('path'); var path = require('path');
var numTasks = args.numTasks ? args.numTasks : 0;
webpack(args.config, function(err, stats){ webpack(args.config, function(err, stats){
if (args.stats) { if (args.stats) {
var statsOptions = { var statsOptions = {
@ -190,7 +188,7 @@ function bundle(args) {
console.log(stats.toString(statsOptions)); 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){ return glob("dist/e2e/**/index.js", function(err, files){
var numTasks = files.length; var numTasks = files.length;
var callback = null;
files.forEach(function(file){ files.forEach(function(file){
var config = require('./scripts/e2e/webpack.config.js'); 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', libraryTarget: 'commonjs2',
filename: path.dirname(file) + '/bundle.js' filename: path.dirname(file) + '/bundle.js'
} }
if (--numTasks === 0) callback = done;
bundle({ bundle({
config: config, config: config,
numTasks: --numTasks,
stats: false, stats: false,
cb: done cb: callback
}); });
}) })
}) })