Open laurentgoudet opened 8 years ago
I don't think everyone who uses typescript with SystemJS wants to have a dependency on angular.
However, creating another plugin-typescript-angular would mean duplicating efforts.
Not necessarily - this plugin itself is less than 200 lines of code, everything else seems perfectly reusable.
I'm still skeptical of tsc-wrapped. I do not like the idea of Angular extending the language independently. I was using TypeScript before Angular 2 and I will keep using it. Of course it is possible that they will not deviate too much from TypeScript but it is tough to say at this point. I fear @Script lives on...
Possibly this could be done by exposing the TypeScript CompilerHost globally so that it could be shared with a separate AoT plugin? It's not really something I would want to take on but if there is something I can do to facilitate it then I am happy to make changes.
plugin-typescript now exposes a global variable tsfactory
which is a Promise<FactoryOutput>
and would enable other plugins to access the CompilerHost used by plugin-typescript (along with the Resolver, TypeChecker and Transpiler). This makes it possible for an AOT compiler plugin to uses these objects to compile files.
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
:Its high level design being:
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 anotherplugin-typescript-angular
would mean duplicating efforts.