chore(build): minify bundles in parallel
This commit is contained in:
parent
6093e28b61
commit
74c0daab27
25
gulpfile.js
25
gulpfile.js
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue