Skip to content

Commit

Permalink
fix(bundles): clean-up and re-organize UMD bundles
Browse files Browse the repository at this point in the history
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
  • Loading branch information
pkozlowski-opensource committed Dec 8, 2015
1 parent 8657ca4 commit fb4f1e8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
20 changes: 2 additions & 18 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
]);
});

Expand Down
11 changes: 11 additions & 0 deletions tools/build/webpack/angular2.umd.js
Original file line number Diff line number Diff line change
@@ -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');

0 comments on commit fb4f1e8

Please sign in to comment.