fix(bundles): don't use angular2/angular2 in config of System.register bundles
Related #5710
This commit is contained in:
parent
44c648fc04
commit
8c69497d8e
45
gulpfile.js
45
gulpfile.js
|
@ -141,6 +141,21 @@ var CONFIG = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var ANGULAR2_BUNDLE_CONFIG = [
|
||||||
|
'angular2/common',
|
||||||
|
'angular2/core',
|
||||||
|
'angular2/compiler',
|
||||||
|
'angular2/instrumentation',
|
||||||
|
'angular2/platform/browser',
|
||||||
|
'angular2/platform/common_dom',
|
||||||
|
'angular2/upgrade'
|
||||||
|
];
|
||||||
|
|
||||||
|
var NG2_BUNDLE_CONTENT = ANGULAR2_BUNDLE_CONFIG.join(' + ');
|
||||||
|
var HTTP_BUNDLE_CONTENT = 'angular2/http - ' + ANGULAR2_BUNDLE_CONFIG.join(' - ');
|
||||||
|
var ROUTER_BUNDLE_CONTENT = 'angular2/router - ' + ANGULAR2_BUNDLE_CONFIG.join(' - ');
|
||||||
|
var TESTING_BUNDLE_CONTENT = 'angular2/testing - ' + ANGULAR2_BUNDLE_CONFIG.join(' - ');
|
||||||
|
|
||||||
var BENCHPRESS_BUNDLE_CONFIG = {
|
var BENCHPRESS_BUNDLE_CONFIG = {
|
||||||
entries: ['./dist/js/cjs/benchpress/index.js'],
|
entries: ['./dist/js/cjs/benchpress/index.js'],
|
||||||
packageJson: './dist/js/cjs/benchpress/package.json',
|
packageJson: './dist/js/cjs/benchpress/package.json',
|
||||||
|
@ -1015,13 +1030,11 @@ gulp.task('!bundle.js.prod', ['build.js.prod'], function() {
|
||||||
var bundler = require('./tools/build/bundle');
|
var bundler = require('./tools/build/bundle');
|
||||||
var bundlerConfig = {sourceMaps: true};
|
var bundlerConfig = {sourceMaps: true};
|
||||||
|
|
||||||
return bundler.bundle(bundleConfig, 'angular2/angular2', './dist/build/angular2.js',
|
return bundler.bundle(bundleConfig, NG2_BUNDLE_CONTENT, './dist/build/angular2.js', bundlerConfig)
|
||||||
bundlerConfig)
|
|
||||||
.then(function() {
|
.then(function() {
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
bundler.bundle(bundleConfig, 'angular2/http - angular2/core', './dist/build/http.js',
|
bundler.bundle(bundleConfig, HTTP_BUNDLE_CONTENT, './dist/build/http.js', bundlerConfig),
|
||||||
bundlerConfig),
|
bundler.bundle(bundleConfig, ROUTER_BUNDLE_CONTENT, './dist/build/router.js',
|
||||||
bundler.bundle(bundleConfig, 'angular2/router - angular2/core', './dist/build/router.js',
|
|
||||||
bundlerConfig)
|
bundlerConfig)
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
@ -1032,14 +1045,14 @@ gulp.task('!bundle.js.min', ['build.js.prod'], function() {
|
||||||
var bundler = require('./tools/build/bundle');
|
var bundler = require('./tools/build/bundle');
|
||||||
var bundlerConfig = {sourceMaps: true, minify: true};
|
var bundlerConfig = {sourceMaps: true, minify: true};
|
||||||
|
|
||||||
return bundler.bundle(bundleConfig, 'angular2/angular2', './dist/build/angular2.min.js',
|
return bundler.bundle(bundleConfig, NG2_BUNDLE_CONTENT, './dist/build/angular2.min.js',
|
||||||
bundlerConfig)
|
bundlerConfig)
|
||||||
.then(function() {
|
.then(function() {
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
bundler.bundle(bundleConfig, 'angular2/http - angular2/core', './dist/build/http.min.js',
|
bundler.bundle(bundleConfig, HTTP_BUNDLE_CONTENT, './dist/build/http.min.js',
|
||||||
bundlerConfig),
|
bundlerConfig),
|
||||||
bundler.bundle(bundleConfig, 'angular2/router - angular2/core',
|
bundler.bundle(bundleConfig, ROUTER_BUNDLE_CONTENT, './dist/build/router.min.js',
|
||||||
'./dist/build/router.min.js', bundlerConfig)
|
bundlerConfig)
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1052,14 +1065,14 @@ gulp.task('!bundle.js.dev', ['build.js.dev'], function() {
|
||||||
var devBundleConfig = merge(true, bundleConfig);
|
var devBundleConfig = merge(true, bundleConfig);
|
||||||
devBundleConfig.paths = merge(true, devBundleConfig.paths, {"*": "dist/js/dev/es5/*.js"});
|
devBundleConfig.paths = merge(true, devBundleConfig.paths, {"*": "dist/js/dev/es5/*.js"});
|
||||||
|
|
||||||
return bundler.bundle(devBundleConfig, 'angular2/angular2', './dist/build/angular2.dev.js',
|
return bundler.bundle(devBundleConfig, NG2_BUNDLE_CONTENT, './dist/build/angular2.dev.js',
|
||||||
bundlerConfig)
|
bundlerConfig)
|
||||||
.then(function() {
|
.then(function() {
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
bundler.bundle(devBundleConfig, 'angular2/http - angular2/core',
|
bundler.bundle(devBundleConfig, HTTP_BUNDLE_CONTENT, './dist/build/http.dev.js',
|
||||||
'./dist/build/http.dev.js', bundlerConfig),
|
bundlerConfig),
|
||||||
bundler.bundle(bundleConfig, 'angular2/router - angular2/core',
|
bundler.bundle(devBundleConfig, ROUTER_BUNDLE_CONTENT, './dist/build/router.dev.js',
|
||||||
'./dist/build/router.dev.js', bundlerConfig)
|
bundlerConfig)
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1085,8 +1098,8 @@ gulp.task('!bundle.testing', ['build.js.dev'], function() {
|
||||||
var devBundleConfig = merge(true, bundleConfig);
|
var devBundleConfig = merge(true, bundleConfig);
|
||||||
devBundleConfig.paths = merge(true, devBundleConfig.paths, {"*": "dist/js/dev/es5/*.js"});
|
devBundleConfig.paths = merge(true, devBundleConfig.paths, {"*": "dist/js/dev/es5/*.js"});
|
||||||
|
|
||||||
return bundler.bundle(devBundleConfig, 'angular2/testing - angular2/angular2',
|
return bundler.bundle(devBundleConfig, TESTING_BUNDLE_CONTENT, './dist/js/bundle/testing.js',
|
||||||
'./dist/js/bundle/testing.js', {sourceMaps: true});
|
{sourceMaps: true});
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('!bundles.js.umd', ['build.js.dev'], function() {
|
gulp.task('!bundles.js.umd', ['build.js.dev'], function() {
|
||||||
|
|
Loading…
Reference in New Issue