From fb4f1e8dc9f3f8135b37f8b4dce7b7b7f74df96b Mon Sep 17 00:00:00 2001 From: Pawel Kozlowski Date: Tue, 8 Dec 2015 14:56:22 +0100 Subject: [PATCH] fix(bundles): clean-up and re-organize UMD bundles Fixes #5593 Part of #5665 BREAKING CHANGE: Number and content of UMD bundles have changed: - we only publish one bundle that contains: core, common, platform/browser, http, router, instrumentation and upgrade - exported names have changed and now: - core is exported as `ng.core` - common is exported as `ng.common` - platform/browser is exported as `ng.platform.browser` - http is exported as `ng.http` - router is exported as `ng.router` - instrumentation is exported as `ng.instrumentation` - upgrade is exported as `ng.upgrade` Closes #5697 --- gulpfile.js | 20 ++------------------ tools/build/webpack/angular2.umd.js | 11 +++++++++++ 2 files changed, 13 insertions(+), 18 deletions(-) create mode 100644 tools/build/webpack/angular2.umd.js diff --git a/gulpfile.js b/gulpfile.js index efd7ae89fb..892c58ec4d 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1115,24 +1115,8 @@ gulp.task('!bundles.js.umd', ['build.js.dev'], function() { } return q.all([ - webpack(webPackConf(['angular2/angular2.js'], 'angular2', 'dev')), - webpack(webPackConf(['angular2/angular2.js'], 'angular2', 'prod')), - webpack(webPackConf( - [ - 'angular2/angular2.js', - 'angular2/http.js', - 'angular2/router/router_link_dsl.js', - 'angular2/router.js' - ], - 'angular2_all', 'dev')), - webpack(webPackConf( - [ - 'angular2/angular2.js', - 'angular2/http.js', - 'angular2/router/router_link_dsl.js', - 'angular2/router.js' - ], - 'angular2_all', 'prod')) + webpack(webPackConf([__dirname + '/tools/build/webpack/angular2.umd.js'], 'angular2', 'dev')), + webpack(webPackConf([__dirname + '/tools/build/webpack/angular2.umd.js'], 'angular2', 'prod')) ]); }); diff --git a/tools/build/webpack/angular2.umd.js b/tools/build/webpack/angular2.umd.js new file mode 100644 index 0000000000..c37393dc58 --- /dev/null +++ b/tools/build/webpack/angular2.umd.js @@ -0,0 +1,11 @@ +exports.core = require('angular2/core'); +exports.common = require('angular2/common'); +exports.platform = { + browser: require('angular2/platform/browser'), + common_dom: require('angular2/platform/common_dom') +}; +exports.http = require('angular2/http'); +exports.router = require('angular2/router'); +exports.router_link_dsl = require('angular2/router/router_link_dsl.js'); +exports.instrumentation = require('angular2/instrumentation'); +exports.upgrade = require('angular2/upgrade');