Callbacks on Successful/Unsuccessful Build
See original GitHub issueCurrent Behavior
Currently, the watch command will just watch for changes and build the module. There is not ability to run any of the typescript using the same command.
Desired Behavior
Add an additional argument to run a command on a successful or failed build as well as firstSuccessfulBuild.
Suggested Solution
tsc-watch provides a good example of how this feature works in practice.
Who does this impact? Who is this for?
This impacts anyone wanting to develop a package with hot-reloading
-like features. In the case someone wants to develop a ts
module for hapi
or express
they can easily restart a development server that will run the module rather than having to manually go restart the server in the symlinked package.
Describe alternatives you’ve considered
Currently I use tsc-watch and run a command like the below: tsc-watch --compiler typescript/bin/tsc --onSuccess npm run start
. This will auto stop the previous instance of the onSuccess callback and start a new process.
At the end of the day, tsdx has a better build process than tsc-watch
and is a lot cleaner and easier to use. It would be a great feature to add to the package.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
Forgot I opened a PR for this. My branch is stale now with some conflicts, but I can work it out if there’s actual interest in adding it to tsdx. Lemme know
Done. Should probably get some tests up around it, though. https://github.com/palmerhq/tsdx/pull/130