forked from m-torin/next-enterprise-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclean-everything.sh
33 lines (27 loc) · 977 Bytes
/
clean-everything.sh
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
32
33
# Log start of the cleaning process
tee >(logger) <<< "================ Clean Everything ================"
tee >(logger) <<< "Removing build directories"
# Remove various build directories and caches
rm -rf $(find . -type d -name .yarn)
rm -rf $(find . -type d -name .cache)
rm -rf $(find . -type d -name .eslintcache)
rm -rf $(find . -type d -name .next)
rm -rf $(find . -type d -name .turbo)
rm -rf $(find . -type d -name "*.log")
rm -rf $(find . -type d -name build)
rm -rf $(find . -type d -name coverage)
rm -rf $(find . -type d -name dist)
# Leave .tmp for Sqlite dbs
# Remove storybook static build
rm -rf apps/ui-library/storybook-static
# Log node modules removal
tee >(logger) <<< "Removing node modules"
rm -rf $(find . -type d -name node_modules)
# Clean up pnpm related files
tee >(logger) <<< "Removing pnpm-lock.yaml"
pnpm store prune
rm -rf pnpm-lock.yaml
# Build process
# tee >(logger) <<< "Build Everything"
# bash build-everything.sh
pnpm self-update