question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Callbacks on Successful/Unsuccessful Build

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
hedgerhcommented, 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

1reaction
hedgerhcommented, Jun 1, 2019

Done. Should probably get some tests up around it, though. https://github.com/palmerhq/tsdx/pull/130

Read more comments on GitHub >

github_iconTop Results From Across the Web

A Refresher on Javascript Callbacks and Promises - Atomic Spin
We call the Promise's resolve function in the success callback and call the Promise's reject function in the failure callback.
Read more >
Handling success data and error callback responses from a ...
Many people standardize callback responses by creating wrapper ... We can handle success data, error responses, and exceptional cases ...
Read more >
Proper Promise handling success and error callbacks
As a parameter of function getAllPropertiesByAppId I have success and error callback. And that's your actual problem.
Read more >
Three ways of attaching success, failure and completion ...
A success callback that gets invoked upon successful completion of an Ajax request · A failure callback that gets invoked in case there...
Read more >
[Build Callbacks] Build is not failing when ... - Unity Issue Tracker
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently. Latest issues. [Linux] Performance ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found