ivogabe / gulp-typescript

A TypeScript compiler for gulp with incremental compilation support.
MIT License
831 stars 129 forks source link

Incremental compilation using new API #635

Open ivogabe opened 4 years ago

ivogabe commented 4 years ago

This PR introduces incremental compilation using the new API provided by TypeScript. This is still work in progress. TODO:

michaelaird commented 4 years ago

Is there any way I could help out with this?

ivogabe commented 4 years ago

Thanks for asking, it's sadly more complex than I thought. We have to adapt to a new API, and that will require some more changes I'm afraid. You could take a look at microsoft/TypeScript#35159. If you don't want to dive into that you can definitely help testing when I made some more progress, but I'm busy at work currently. I hope I can find a weekend to work on this soon.

michaelaird commented 4 years ago

Would you consider splitting this into 2 features? one to handle createIncrementalProgram + emitting .tsbuildinfo and a second one to improve watch mode?

ivogabe commented 4 years ago

Yes I was already thinking to do that, but I was planning to do the second first actually. But given that we have to use a different API for watch mode, it is probably indeed better to do it in your order. We can probably do that without using the watcher API. Do you want to take a look at the first?

promethyttrium commented 3 years ago

It's now August, will this be merged soon?

TotooriaHyperion commented 3 years ago

I find that with incremental enabled, the original incremental compiler of typescript will emit a file that skip my custom transformer(it's not declared in tsconfig but in gulpfile). And after the gulp watcher and task, I get a new file that go through all transformer. Hope this feature be released soon.