fix(build): reorder bundling step

Closes #5208
This commit is contained in:
Rob Wormald 2015-11-09 18:05:27 -08:00
parent ee07646059
commit 5fecb3b3f2
1 changed files with 23 additions and 17 deletions

View File

@ -976,12 +976,14 @@ gulp.task('!bundle.js.prod', ['build.js.prod'], function() {
var bundlerConfig = {
sourceMaps: true
};
return q.all([
bundler.bundle(bundleConfig, 'angular2/angular2', './dist/build/angular2.js', bundlerConfig),
bundler.bundle(bundleConfig, 'angular2/http - angular2/angular2', './dist/build/http.js', bundlerConfig),
bundler.bundle(bundleConfig, 'angular2/router - angular2/angular2', './dist/build/router.js', bundlerConfig)
]);
return bundler.bundle(bundleConfig, 'angular2/angular2', './dist/build/angular2.js', bundlerConfig)
.then(function(){
return q.all([
bundler.bundle(bundleConfig, 'angular2/http - angular2/angular2', './dist/build/http.js', bundlerConfig),
bundler.bundle(bundleConfig, 'angular2/router - angular2/angular2', './dist/build/router.js', bundlerConfig)
]);
});
});
// minified production build
@ -990,12 +992,14 @@ gulp.task('!bundle.js.min', ['build.js.prod'], function() {
sourceMaps: true,
minify: true
};
return q.all([
bundler.bundle(bundleConfig, 'angular2/angular2', './dist/build/angular2.min.js', bundlerConfig),
bundler.bundle(bundleConfig, 'angular2/http - angular2/angular2', './dist/build/http.min.js', bundlerConfig),
bundler.bundle(bundleConfig, 'angular2/router - angular2/angular2', './dist/js/build/router.min.js', bundlerConfig)
]);
return bundler.bundle(bundleConfig, 'angular2/angular2', './dist/build/angular2.min.js', bundlerConfig)
.then(function(){
return q.all([
bundler.bundle(bundleConfig, 'angular2/http - angular2/angular2', './dist/build/http.min.js', bundlerConfig),
bundler.bundle(bundleConfig, 'angular2/router - angular2/angular2', './dist/js/build/router.min.js', bundlerConfig)
]);
});
});
// development build
@ -1009,11 +1013,13 @@ gulp.task('!bundle.js.dev', ['build.js.dev'], function() {
"*": "dist/js/dev/es5/*.js"
});
return q.all([
bundler.bundle(devBundleConfig, 'angular2/angular2', './dist/build/angular2.dev.js', bundlerConfig),
bundler.bundle(devBundleConfig, 'angular2/http - angular2/angular2', './dist/build/http.dev.js', bundlerConfig),
bundler.bundle(bundleConfig, 'angular2/router - angular2/angular2', './dist/build/router.dev.js', bundlerConfig)
]);
return bundler.bundle(devBundleConfig, 'angular2/angular2', './dist/build/angular2.dev.js', bundlerConfig)
.then(function(){
return q.all([
bundler.bundle(devBundleConfig, 'angular2/http - angular2/angular2', './dist/build/http.dev.js', bundlerConfig),
bundler.bundle(bundleConfig, 'angular2/router - angular2/angular2', './dist/build/router.dev.js', bundlerConfig)
]);
});
});
// WebWorker build