tldraw/scripts/clean.sh
Dan Groshev 8f61ede9bb
Fix yarn clean (#2620)
`scripts/clean.sh` was using a hardcoded Yarn [to avoid `npx yarn` using
Yarn
1](4242f6ee3d).
However, apparently the Blessed Way of using Yarn is to use `corepack`
and have it install the Yarn version specified in `packageManager`.

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package
2024-01-24 16:36:24 +00:00

39 lines
No EOL
743 B
Bash
Executable file

#!/usr/bin/env bash
set -eux
# a function called 'goodbye' that takes a string as an argument
function goodbye() {
rm -rf $1
rm -rf */$1
rm -rf */*/$1
rm -rf */*/*/$1
rm -rf */*/*/*/$1
rm -rf */*/*/*/*/$1
rm -rf **/$1
}
rm -rf node_modules
goodbye node_modules
goodbye .turbo
goodbye tmp-assets
goodbye tsconfig.tsbuildinfo
goodbye tsconfig.build.tsbuildinfo
goodbye tsconfig.build.json
goodbye .lazy
goodbye dist-esm
goodbye dist-cjs
goodbye .tsbuild
goodbye .tsbuild-pub
goodbye .tsbuild-dev
goodbye .tsbuild-api
goodbye .next
rm -rf packages/*/api
rm -rf {packages,apps}/*/*.tgz
rm -rf {packages,apps}/vscode/extension/temp
rm -rf {packages,apps}/vscode/extension/editor
rm -rf apps/docs/content.json
corepack enable
yarn