Skip to content

Commit

Permalink
Fix 'yarn pack' (#238)
Browse files Browse the repository at this point in the history
The `yarn pack` command is run by the `npm-publish` action prior to
publishing the package. Unfortunately, this command does not work as the
`prepack` lifecycle script is overridden to run `yarn build:clean`,
which was removed when this repo was converted to use `tsup` for
building. `tsup` already has a way of clearing `dist` via a `--clean` flag, so
this commit modifies the `build` script to use it and modifies the prepack
script to run `yarn build` instead of `yarn build:clean`.
  • Loading branch information
mcmire authored Jan 18, 2024
1 parent e0a50e4 commit 354995b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"dist"
],
"scripts": {
"build": "tsup && yarn build:types",
"build": "tsup --clean && yarn build:types",
"build:docs": "typedoc",
"build:types": "tsc --project tsconfig.build.json",
"lint": "yarn lint:eslint && yarn lint:constraints && yarn lint:misc --check && yarn lint:dependencies --check && yarn lint:changelog",
Expand Down
2 changes: 1 addition & 1 deletion scripts/prepack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ if [[ -n $SKIP_PREPACK ]]; then
exit 0
fi

yarn build:clean
yarn build

0 comments on commit 354995b

Please sign in to comment.