angular-cn/tools/@angular/tsc-wrapped
Paul Gschwendtner 96aa2365ae fix(tsc-wrapped): ensure valid path separators in metadata
* Fixes that `tsc-wrapped` stores invalid path separators in the bundled metadata files. Previous errors could have been: `Cannot find module '.corecoordinationnique-selection-dispatcher'.` (See https://github.com/angular/material2/issues/3834)
* Fixes failing tests on Windows. Now all tooling tests are green on Windows.

Related to #15403
2017-04-10 16:01:38 -06:00
..
src fix(tsc-wrapped): ensure valid path separators in metadata 2017-04-10 16:01:38 -06:00
test fix(tsc-wrapped): ensure valid path separators in metadata 2017-04-10 16:01:38 -06:00
README.md docs: branding fixes (#14132) 2017-01-27 15:03:11 -06:00
index.ts feat(tsc-wrapped): add an option to `ngc` to bundle metadata (#14509) 2017-02-16 08:15:30 -08:00
package.json release: cut the 4.1.0-beta.0 release 2017-03-29 16:55:47 -07:00

README.md

tsc-wrapped

This package is an internal dependency used by @angular/compiler-cli. Please use that instead.

This is a wrapper around TypeScript's tsc program that allows us to hook in extra extensions. TypeScript will eventually have an extensibility model for arbitrary extensions. We don't want to constrain their design with baggage from a legacy implementation, so this wrapper only supports specific extensions developed by the Angular team:

  • tsickle down-levels Decorators into Annotations so they can be tree-shaken
  • tsickle can also optionally produce Closure Compiler-friendly code
  • ./collector.ts emits an extra .metadata.json file for every .d.ts file written, which retains metadata about decorators that is lost in the TS emit
  • @angular/compiler-cli extends this library to additionally generate template code

TypeScript Decorator metadata collector

The .d.ts format does not preserve information about the Decorators applied to symbols. Some tools, such as Angular template compiler, need access to statically analyzable information about Decorators, so this library allows programs to produce a foo.metadata.json to accompany a foo.d.ts file, and preserves the information that was lost in the declaration emit.

Releasing

$ $(npm bin)/tsc -p tools
$ cp tools/tsc-wrapped/package.json dist/tools/@angular/tsc-wrapped/
$ npm login [angular]
$ npm publish dist/tools/@angular/tsc-wrapped