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

@ -977,12 +977,14 @@ gulp.task('!bundle.js.prod', ['build.js.prod'], function() {
sourceMaps: true
};
return bundler.bundle(bundleConfig, 'angular2/angular2', './dist/build/angular2.js', bundlerConfig)
.then(function(){
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)
]);
});
});
// minified production build
gulp.task('!bundle.js.min', ['build.js.prod'], function() {
@ -991,12 +993,14 @@ gulp.task('!bundle.js.min', ['build.js.prod'], function() {
minify: true
};
return bundler.bundle(bundleConfig, 'angular2/angular2', './dist/build/angular2.min.js', bundlerConfig)
.then(function(){
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)
]);
});
});
// development build
gulp.task('!bundle.js.dev', ['build.js.dev'], function() {
@ -1009,12 +1013,14 @@ gulp.task('!bundle.js.dev', ['build.js.dev'], function() {
"*": "dist/js/dev/es5/*.js"
});
return bundler.bundle(devBundleConfig, 'angular2/angular2', './dist/build/angular2.dev.js', bundlerConfig)
.then(function(){
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)
]);
});
});
// WebWorker build
gulp.task("!bundle.web_worker.js.dev", ["build.js.dev"], function() {