Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage with tsc --build option #99

Closed
niklas-dahl opened this issue Aug 3, 2020 · 4 comments
Closed

Usage with tsc --build option #99

niklas-dahl opened this issue Aug 3, 2020 · 4 comments

Comments

@niklas-dahl
Copy link

I am using project-references https://www.typescriptlang.org/docs/handbook/project-references.html and would like to reload my server if any of the referenced projects change.
Using tsc --build --incremental --watch already does everything I want, there is just no way to restart the server once tsc is done with a change.
As far as I understand microsoft/TypeScript#29978 it should be possible.
But it seems that ts-node has not adopted the new APIs TypeStrong/ts-node#817.

Is it possible with this tool to just pass the required flags to tsc?
Setting build, incremental, watch to true in the tsconfig.json does not work.

Thanks.

@gilamran
Copy link
Owner

gilamran commented Aug 3, 2020

Did you try:
tsc-watch --build --incremental (--watch is automatically added by tsc-watch)

@niklas-dahl
Copy link
Author

Oh wow thanks, did actually not try that, it seems to work perfectly.

Just another small thing, piping the output like this --onSuccess \"node js/index.js | pino-pretty -t -c\" does not seem to work, I just get the regular output.

@gilamran
Copy link
Owner

gilamran commented Aug 3, 2020

The commands MUST be one command, you can run an npm command that does just that.

@niklas-dahl
Copy link
Author

That works! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants