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

Callbacks on Successful/Unsuccessful Build #104

Closed
GoPro16 opened this issue May 16, 2019 · 6 comments · Fixed by #130
Closed

Callbacks on Successful/Unsuccessful Build #104

GoPro16 opened this issue May 16, 2019 · 6 comments · Fixed by #130
Labels
kind: feature New feature or request

Comments

@GoPro16
Copy link

GoPro16 commented May 16, 2019

Current 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.

@GoPro16 GoPro16 changed the title Start Scripts on Successful Build Callbacks on Successful/Unsuccessful Build May 16, 2019
@swyxio
Copy link
Collaborator

swyxio commented May 16, 2019

interesting feature. PR welcome.

@jaredpalmer
Copy link
Owner

Yeah this is a great idea

@hedgerh
Copy link
Contributor

hedgerh commented May 25, 2019

i could pick this up, unless there are any more pressing issues. looks pretty straight forward with being able to use tsc-watch for reference.

@hedgerh
Copy link
Contributor

hedgerh commented Jun 1, 2019

Done. Should probably get some tests up around it, though.
#130

@hedgerh
Copy link
Contributor

hedgerh commented Jun 28, 2019

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

@swyxio
Copy link
Collaborator

swyxio commented Nov 4, 2019

yes, still interested. just need to fix merge conflicts and be sure to hyphen-case instead of camel case (see jared's recent pr on casing)

@agilgur5 agilgur5 added the kind: feature New feature or request label Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants