-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathnuke_install.sh
More file actions
31 lines (23 loc) · 931 Bytes
/
Copy pathnuke_install.sh
File metadata and controls
31 lines (23 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
set -euo pipefail
# Enable recursive globbing (needed for Bash >=4)
shopt -s globstar 2>/dev/null || true
echo "🔍 Cleaning up workspace..."
# Delete all .nx directories recursively
echo "🧹 Removing .nx directories..."
find . -type d -name ".nx" -prune -exec rm -rf {} +
# Delete all build directories recursively
echo "🧹 Removing build directories..."
find . -type d -name "build" -prune -exec rm -rf {} +
# Delete all dist directories recursively
echo "🧹 Removing dist directories..."
find . -type d -name "dist" -prune -exec rm -rf {} +
# Delete all node_modules directories recursively
echo "🧹 Removing node_modules directories..."
find . -type d -name "node_modules" -prune -exec rm -rf {} +
# Delete package-lock.json in the root if it exists
if [[ -f "package-lock.json" ]]; then
echo "🧾 Removing package-lock.json..."
rm -f package-lock.json
fi
echo "✅ Cleanup completed."