chore(build): minify bundles in parallel

This commit is contained in:
Pawel Kozlowski 2015-10-03 19:32:19 +02:00
parent 6093e28b61
commit 74c0daab27
1 changed files with 10 additions and 19 deletions

View File

@ -1095,25 +1095,16 @@ gulp.task('!bundle.js.prod', ['build.js.prod'], function() {
// minified production build // minified production build
gulp.task('!bundle.js.min', ['build.js.prod'], function() { gulp.task('!bundle.js.min', ['build.js.prod'], function() {
return bundler.bundle( var q = require('q');
bundleConfig, var minBundleConfig = {
'angular2/angular2',
'./dist/build/angular2.min.js',
{
sourceMaps: true, sourceMaps: true,
minify: true minify: true
}). };
then(function(){
return bundler.bundle( return q.all([
bundleConfig, bundler.bundle(bundleConfig, 'angular2/angular2', './dist/build/angular2.min.js', minBundleConfig),
'angular2/http', bundler.bundle(bundleConfig, 'angular2/http', './dist/build/http.min.js', minBundleConfig)
'./dist/build/http.min.js', ]);
{
sourceMaps: true,
minify: true
}
);
});
}); });
// development build // development build