3 ms·
I'm not in love with the way the MVC framework takes over and wraps the TS compiler (and a very specific version of the TS compiler) to compile templates. Seems
by paulddraper 8y ago
I'm not in love with the way the MVC framework takes over and wraps the TS compiler (and a very specific version of the TS compiler) to compile templates. Seems an obvious layering violation.
I'll take composition over inheritance in my tooling.
- vikingcaffiene 8y agoI suppose I'd need to know what specifically you've run up against to justify your distaste for the approach. I too prefer composition but I'm not against another way if it works.
- paulddraper 8y agoIt's a really bad architecture. Couple of examples (1) The angular compiler doesn't have the same JS or CLI interface as the TypeScript compiler. I have to know very specifically which I am using when; my build tooling must always know whether it's compiling TS the Angular way, or the vanilla way, and there isn't much commonality. (2) What if I want to use an alternative TS compiler? Or someone writes a faster one in Go? Or I want to use tsickle [1], which is Closure Compiler-compatible? Now it turns out there isn't a TS compiler in Go, and the Angular team are the authors of tsickle, and so ngc happens to work with it. But it's an architectural smell to couple that closely for my MVC framework (and IMO with little necessity). [1] https://github.com/angular/tsickle https://github.com/angular/tsickle