-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# Function to remove specified directories | ||
remove_directories() { | ||
local dir=$1 | ||
local dirs_to_remove=("node_modules" "dist" ".next" ".turbo") | ||
for sub_dir in "${dirs_to_remove[@]}"; do | ||
if [ -d "$dir/$sub_dir" ]; then | ||
echo "Removing ${dir%/}/$sub_dir..." | ||
rm -rf "${dir%/}/$sub_dir" | ||
fi | ||
done | ||
} | ||
|
||
# Remove directories in root | ||
remove_directories . | ||
|
||
# Remove directories in apps/{appName} | ||
for dir in pro/*/; do | ||
remove_directories "$dir" | ||
done | ||
|
||
# Remove directories in packages/{packageName} | ||
for dir in packages/*/; do | ||
remove_directories "$dir" | ||
done | ||
|
||
echo "All specified directories have been removed." |