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', sourceMaps: true,
'./dist/build/angular2.min.js', minify: true
{ };
sourceMaps: true,
minify: true return q.all([
}). bundler.bundle(bundleConfig, 'angular2/angular2', './dist/build/angular2.min.js', minBundleConfig),
then(function(){ bundler.bundle(bundleConfig, 'angular2/http', './dist/build/http.min.js', minBundleConfig)
return bundler.bundle( ]);
bundleConfig,
'angular2/http',
'./dist/build/http.min.js',
{
sourceMaps: true,
minify: true
}
);
});
}); });
// development build // development build