egoist / egoist/tsup

Add support for an onError callback

Open
#931 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.3k
Forks
275
PR merge metrics
No merged PRs in 30d

Description

Instead of cleaning the output folder on build start (like the `clean` option), I'd rather have it only clean it on build failure. I noticed there's a `onSuccess` handler, but it seems like an accompanying `onError` callback is missing. Any objection to adding this?

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing onSuccess handler and the build-start cleanup associated with the clean option. Trace the build failure path and define the callback behavior so the output folder is cleaned only after a failed build; done means an onError callback is available and invoked in that case.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.