X Tutup
Skip to content

Commit 283962f

Browse files
fix(bundles): remove ngUpgrade from the angular2.js bundle
Closes #5739 BREAKING CHANGE: `ngUpgrade` related symbols are no longer part of the `angular2.js` bundle. `ngUpgrade` has a dedicated `upgrade.js` bundle now. Closes #5854
1 parent 892f9e1 commit 283962f

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

gulpfile.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ var ANGULAR2_BUNDLE_CONFIG = [
147147
'angular2/compiler',
148148
'angular2/instrumentation',
149149
'angular2/platform/browser',
150-
'angular2/platform/common_dom',
151-
'angular2/upgrade'
150+
'angular2/platform/common_dom'
152151
];
153152

154153
var NG2_BUNDLE_CONTENT = ANGULAR2_BUNDLE_CONFIG.join(' + ');
155154
var HTTP_BUNDLE_CONTENT = 'angular2/http - ' + ANGULAR2_BUNDLE_CONFIG.join(' - ');
156155
var ROUTER_BUNDLE_CONTENT = 'angular2/router - ' + ANGULAR2_BUNDLE_CONFIG.join(' - ');
157156
var TESTING_BUNDLE_CONTENT = 'angular2/testing - ' + ANGULAR2_BUNDLE_CONFIG.join(' - ');
157+
var UPGRADE_BUNDLE_CONTENT = 'angular2/upgrade - ' + ANGULAR2_BUNDLE_CONFIG.join(' - ');
158158

159159
var BENCHPRESS_BUNDLE_CONFIG = {
160160
entries: ['./dist/js/cjs/benchpress/index.js'],
@@ -1035,6 +1035,8 @@ gulp.task('!bundle.js.prod', ['build.js.prod'], function() {
10351035
return Promise.all([
10361036
bundler.bundle(bundleConfig, HTTP_BUNDLE_CONTENT, './dist/build/http.js', bundlerConfig),
10371037
bundler.bundle(bundleConfig, ROUTER_BUNDLE_CONTENT, './dist/build/router.js',
1038+
bundlerConfig),
1039+
bundler.bundle(bundleConfig, UPGRADE_BUNDLE_CONTENT, './dist/build/upgrade.js',
10381040
bundlerConfig)
10391041
]);
10401042
});
@@ -1052,6 +1054,8 @@ gulp.task('!bundle.js.min', ['build.js.prod'], function() {
10521054
bundler.bundle(bundleConfig, HTTP_BUNDLE_CONTENT, './dist/build/http.min.js',
10531055
bundlerConfig),
10541056
bundler.bundle(bundleConfig, ROUTER_BUNDLE_CONTENT, './dist/build/router.min.js',
1057+
bundlerConfig),
1058+
bundler.bundle(bundleConfig, UPGRADE_BUNDLE_CONTENT, './dist/build/upgrade.min.js',
10551059
bundlerConfig)
10561060
]);
10571061
});
@@ -1072,6 +1076,8 @@ gulp.task('!bundle.js.dev', ['build.js.dev'], function() {
10721076
bundler.bundle(devBundleConfig, HTTP_BUNDLE_CONTENT, './dist/build/http.dev.js',
10731077
bundlerConfig),
10741078
bundler.bundle(devBundleConfig, ROUTER_BUNDLE_CONTENT, './dist/build/router.dev.js',
1079+
bundlerConfig),
1080+
bundler.bundle(devBundleConfig, UPGRADE_BUNDLE_CONTENT, './dist/build/upgrade.dev.js',
10751081
bundlerConfig)
10761082
]);
10771083
});
@@ -1156,7 +1162,8 @@ gulp.task('!bundle.js.prod.deps', ['!bundle.js.prod'], function() {
11561162

11571163
return merge2(addDevDependencies('angular2.js'),
11581164
bundler.modify(['dist/build/http.js'], 'http.js'),
1159-
bundler.modify(['dist/build/router.js'], 'router.js'))
1165+
bundler.modify(['dist/build/router.js'], 'router.js'),
1166+
bundler.modify(['dist/build/upgrade.js'], 'upgrade.js'))
11601167
.pipe(gulp.dest('dist/js/bundle'));
11611168
});
11621169

@@ -1166,7 +1173,8 @@ gulp.task('!bundle.js.min.deps', ['!bundle.js.min'], function() {
11661173

11671174
return merge2(addDevDependencies('angular2.min.js'),
11681175
bundler.modify(['dist/build/http.min.js'], 'http.min.js'),
1169-
bundler.modify(['dist/build/router.min.js'], 'router.min.js'))
1176+
bundler.modify(['dist/build/router.min.js'], 'router.min.js'),
1177+
bundler.modify(['dist/build/upgrade.min.js'], 'upgrade.min.js'))
11701178
.pipe(uglify())
11711179
.pipe(gulp.dest('dist/js/bundle'));
11721180
});
@@ -1209,7 +1217,8 @@ gulp.task('!bundle.js.dev.deps', ['!bundle.js.dev'], function() {
12091217

12101218
return merge2(addDevDependencies('angular2.dev.js'),
12111219
bundler.modify(['dist/build/http.dev.js'], 'http.dev.js'),
1212-
bundler.modify(['dist/build/router.dev.js'], 'router.dev.js'))
1220+
bundler.modify(['dist/build/router.dev.js'], 'router.dev.js'),
1221+
bundler.modify(['dist/build/upgrade.dev.js'], 'upgrade.dev.js'))
12131222
.pipe(gulp.dest('dist/js/bundle'));
12141223
});
12151224

0 commit comments

Comments
 (0)
X Tutup