From 74c0daab270bcb462eea10dd3a4e2a81557ed9a3 Mon Sep 17 00:00:00 2001 From: Pawel Kozlowski Date: Sat, 3 Oct 2015 19:32:19 +0200 Subject: [PATCH] chore(build): minify bundles in parallel --- gulpfile.js | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 8a33fedaf1..326428239e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1095,25 +1095,16 @@ gulp.task('!bundle.js.prod', ['build.js.prod'], function() { // minified production build gulp.task('!bundle.js.min', ['build.js.prod'], function() { - return bundler.bundle( - bundleConfig, - 'angular2/angular2', - './dist/build/angular2.min.js', - { - sourceMaps: true, - minify: true - }). - then(function(){ - return bundler.bundle( - bundleConfig, - 'angular2/http', - './dist/build/http.min.js', - { - sourceMaps: true, - minify: true - } - ); - }); + var q = require('q'); + var minBundleConfig = { + sourceMaps: true, + minify: true + }; + + return q.all([ + bundler.bundle(bundleConfig, 'angular2/angular2', './dist/build/angular2.min.js', minBundleConfig), + bundler.bundle(bundleConfig, 'angular2/http', './dist/build/http.min.js', minBundleConfig) + ]); }); // development build