chore: add deep cleanup script (#5713)

This commit is contained in:
Oleg Isonen authored and GitHub committed 2026-04-23 13:23:20 +02:00
1 parent f052200d07
commit 8f73885162
2 files changed
+20 -1

No files matched your search

Executable
+18
View File
@@ -0,0 +1,18 @@
#!/bin/bash
set -euo pipefail
echo "Removing dependency, build, and cache directories..."
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +
find . -name 'lib' -type d -prune -exec rm -rf '{}' +
find . -name 'build' -type d -prune -exec rm -rf '{}' +
find . -name 'dist' -type d -prune -exec rm -rf '{}' +
find . -name '.vite' -type d -prune -exec rm -rf '{}' +
find . -name '.cache' -type d -prune -exec rm -rf '{}' +
find . -name '.pnpm-store' -type d -prune -exec rm -rf '{}' +
find . -name '.eslintcache' -type f -delete
find . -name '*.tsbuildinfo' -type f -delete
echo "Cleanup completed."
+2 -1
View File
@@ -21,7 +21,8 @@
"local:version-snapshot": "pnpm -r exec pnpm version prepatch --preid $(cat /dev/urandom | LC_ALL=C tr -dc 'a-z' | fold -w 8 | head -n 1)", "local:version-snapshot": "pnpm -r exec pnpm version prepatch --preid $(cat /dev/urandom | LC_ALL=C tr -dc 'a-z' | fold -w 8 | head -n 1)",
"local:publish-snapshot": "pnpm -r publish --access public --no-git-checks --registry http://localhost:4873", "local:publish-snapshot": "pnpm -r publish --access public --no-git-checks --registry http://localhost:4873",
"local:dangerously-undo-version-snapshot": "git restore --source=$(git branch --show-current) '**/*/package.json'", "local:dangerously-undo-version-snapshot": "git restore --source=$(git branch --show-current) '**/*/package.json'",
"local:release": "pnpm build && pnpm dts && pnpm local:version-snapshot && pnpm local:publish-snapshot && pnpm local:dangerously-undo-version-snapshot && echo \"now execute\npnpm up -r -L '@webstudio-is/*' --registry http://localhost:4873\"" "local:release": "pnpm build && pnpm dts && pnpm local:version-snapshot && pnpm local:publish-snapshot && pnpm local:dangerously-undo-version-snapshot && echo \"now execute\npnpm up -r -L '@webstudio-is/*' --registry http://localhost:4873\"",
"clean:deep": "bash ./cleanup.sh"
}, },
"simple-git-hooks": { "simple-git-hooks": {
"pre-commit": "./node_modules/.bin/nano-staged" "pre-commit": "./node_modules/.bin/nano-staged"