tsc-watch icon indicating copy to clipboard operation
tsc-watch copied to clipboard

Please add a --no-watch option

Open miningape opened this issue 3 years ago • 7 comments

tsc-watch is often used to create run scripts because it makes it so convenient to programmatically run the compiler and connect/start multiple sources. In my case I have a really slow computer and 10+ NestJS microservices and a React frontend get recompiled every single time I save a file which causes massive slowdown. I would really like the option to pass a --no-watch flag to disable the watch behaviour because the API exposed by tsc-watch to interact with tsc is so nice but watch mode slowing down my computer makes me want to die.

I would be happy to add this in a PR myself, I just need a bit of direction on where to get started.

miningape avatar Oct 19 '22 10:10 miningape

How about creating a script that uses tsc-watch programmatically, there's an example on the repo.

gilamran avatar Oct 19 '22 10:10 gilamran

Taking a look, thank you

miningape avatar Oct 19 '22 10:10 miningape

hmm, thinking about it... you can't disable the recompile, tsc-watch always adds --watch. so maybe a PR is a good idea :-)

gilamran avatar Oct 19 '22 10:10 gilamran

I think the example you were referring to is very similar to the script I am using currently so it would be nice with that option :)

miningape avatar Oct 19 '22 10:10 miningape

PR?

gilamran avatar Oct 19 '22 12:10 gilamran

Closing as there's no activity

gilamran avatar Mar 27 '24 13:03 gilamran

Consider implementing

gilamran avatar Apr 07 '24 11:04 gilamran