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

A hook that runs once after all builds have completed #777

Open
steveluscher opened this issue Nov 17, 2022 · 3 comments · May be fixed by #780
Open

A hook that runs once after all builds have completed #777

steveluscher opened this issue Nov 17, 2022 · 3 comments · May be fixed by #780

Comments

@steveluscher
Copy link
Contributor

steveluscher commented Nov 17, 2022

Current behavior

The onSuccess hook runs once for every build config. In this example, ./prepareNpmEntrypoints.sh will run twice.

// tsup.config.ts
export default defineConfig([
  { /* ... */ },
  { /* ... */ },
]);
pnpm tsup --watch --onSuccess "./prepareNpmEntrypoints.sh"

Feature request

A hook that runs once, when all of the builds have completed. This can be used, for instance, to run a script that patches up the build products in some way that's not possible to do during the build.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@younggglcy younggglcy linked a pull request Nov 19, 2022 that will close this issue
@geekact
Copy link

geekact commented Dec 9, 2022

By the way, *.d.ts hasn't been touched yet when onSuccess is triggered.

@wighawag
Copy link

Was going to write an issue for what @geekact mentioned
I expected the onSuccess to be called after *.d.ts are generated, not between the *.js and *.d.ts

@boredjoker
Copy link

Was going to write an issue for what @geekact mentioned I expected the onSuccess to be called after *.d.ts are generated, not between the *.js and *.d.ts

anything new about this?

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

Successfully merging a pull request may close this issue.

4 participants