-
Notifications
You must be signed in to change notification settings - Fork 46
Description
First, thanks for your awesome work on that plugin! I was wondering how/if support for Angular's AoT Compiler could be added.
As describe at @angular/compiler-cli
:
This CLI is intended for demos, prototyping, or for users with simple build systems that run bare tsc.
Users with a build system should expect an Angular 2 template plugin. Such a plugin would be based on the index.ts in this directory, but should share the TypeScript compiler instance with the one already used in the plugin for TypeScript typechecking and emit.
Its high level design being:
At a high level, this program
- collects static metadata about the sources using the tsc-wrapped package in angular2
- uses the OfflineCompiler from angular2/src/compiler/compiler to codegen additional .ts files
- these .ts files are written to the genDir path, then compiled together with the application.
While I guess the TypeScript version could be overridden by tsc-wrapper
, the full Angular compilation process is more complex and may be too-specialized for the purpose of that plugin. However, creating another plugin-typescript-angular
would mean duplicating efforts.