Skip to content

chore: change bundle rules to generate one sfx module and several minimal modules #3714

@jeffbcross

Description

@jeffbcross

As outlined in #3458, there should be bundles for angular2.js and all of its direct children. The angular2.js module will get special sfx versions that include all third-party dependencies, as well as all angular2 modules.

Blocked by #3713

Description copied from #3458:

These will be the bundles that are exported:

  • angular2.js (includes all other bundles)
  • core.js
  • core-no-render.js (core without render, for non-dom contexts)
  • forms.js
  • http.js
  • router.js
  • web_worker.js
  • zone.js

And these are the extensions with which each bundle will be published to code.angularjs.org and npm. Bundles will be in the bundles folder of the npm package and will be published to code.angularjs.org as code.angularjs.org/<version-number>/<bundle-name>.

  • .js
  • .d.ts (typings are in separate typings folder in npm distribution)
  • .js.map
  • .min.js (Using uglify for now, eventually using angular/ts-minify)
  • .dev.js (runs in dev mode)
  • .dev.js.map
  • _testing.js
  • _testing.js.map
  • _testing.d.ts

The angular2 bundle will also get an sfx version, which will include dependencies like Rx, reflect-metadata, traceur-runtime, and will export a global ng object.

  • angular2.sfx.js
  • angular2.sfx.min.js
  • angular2.sfx.js.map
  • angular2.sfx.min.js.map
  • angular2_with_testing.js*
  • angular2_with_testing.js.map

The _testing bundles will include testing utilities and mocks for the respective module. The core_testing.js will include the bulk of the testing utilities, leaving other testing bundles to mostly just include mocks.

  • Includes angular2-testing to de-dupe dependencies.

TODO

  • Update bundle build rules
  • Change ambient declarations to use ng namespace instead of prefix, i.e. ng.http instead of ngHttp.
  • Add automated tests against bundles (try using example e2e tests)
  • Add readme to bundles folder on code.angularjs.org and npm dist to explain how to use
  • Make sure there's an issue to document how to use bundles in docs

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions