11 Commits

Author SHA1 Message Date
Tobias Bosch
bf598d6b8b feat(compiler): support sync runtime compile
Adds new abstraction `Compiler` with methods
`compileComponentAsync` and `compileComponentSync`.
This is in preparation of deprecating `ComponentResolver`.

`compileComponentSync` is able to compile components
synchronously given all components either have an inline
template or they have been compiled before.

Also changes `TestComponentBuilder.createSync` to
take a `Type` and use the new `compileComponentSync` method.

Also supports overriding the component metadata even if
the component has already been compiled.

Also fixes #7084 in a better way.

BREAKING CHANGE:
`TestComponentBuilder.createSync` now takes a component type
and throws if not all templates are either inlined
are compiled before via `createAsync`.

Closes #9594
2016-06-28 10:26:16 -07:00
ScottSWu
ae75e3640a chore(lint): Added license headers to most TypeScript files
Relates to #9380
2016-06-23 09:47:54 -07:00
Misko Hevery
279e816ea7 chore: Remove unnecessary calls to Parse5DomAdapter
This reverts commit 80deac5cded4d3534771c3484f937b0f8dde143c.
2016-06-19 08:42:00 -07:00
Tobias Bosch
c0f2a22a08 fix(perf): support prod mode again
After splitting the facades into multiple modules,
enabling prod mode for code had no effect for the compiler.

Also in a change between RC1 and RC2 we created the `CompilerConfig`
via a provider with `useValue` and not via a `useFactory`, which reads
the prod mode too early.

Closes #9318
Closes #8508
Closes #9318
2016-06-17 15:59:27 -07:00
Victor Berchet
1eaa193c51 feat(compiler-cli): add a debug option to control the output
fixes #9208
2016-06-15 18:13:57 -07:00
Misko Hevery
80deac5cde Revert "chore: Remove unnecessary calls to Parse5DomAdapter"
This reverts commit 387a90e5465ceed7b2c634695d17f4f835dd5687.
2016-06-14 19:40:43 -07:00
Misko Hevery
387a90e546 chore: Remove unnecessary calls to Parse5DomAdapter 2016-06-14 13:07:11 -07:00
Tobias Bosch
bc888bf3a1 refactor(compiler): Change arguments of CompilerConfig to named arguments
BREAKIKNG CHANGE:
`CompilerConfig` used to take positional arguments and now takes named arguments.

Closes #9172
2016-06-13 13:14:07 -07:00
Alex Eagle
f39c9c9e75 style(lint): re-format modules/@angular 2016-06-09 17:00:15 -07:00
Chuck Jazdzewski
0658eb4429 fix(compiler): Added unit test to ReflectorHost and fixed issues (#9052)
Refactored ReflectorHost to allow it to be tested.
Fixed an issue where the .d.ts was findable but it wasn't used by the project
  (This happens when the .metadata.json file references a module that was not
   needed, such as it doesn't declare any types, and the reference to it was
   elided by TypeScript when writing the .d.ts file).
Added tests for ReflectorHost
2016-06-09 14:51:53 -07:00
Victor Berchet
1090601e8b refactor(compiler): rename /compiler_cli to /compiler-cli 2016-06-02 13:50:32 -07:00