forked from Osaram-007/v_19
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclean.bat
More file actions
119 lines (105 loc) · 2.89 KB
/
clean.bat
File metadata and controls
119 lines (105 loc) · 2.89 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@echo off
echo Cleaning static files, cache, and build outputs...
REM Delete Next.js build output
if exist .next (
echo Removing .next directory...
rmdir /s /q .next
)
REM Delete static export output
if exist out (
echo Removing out directory...
rmdir /s /q out
)
REM Clean static directories - more comprehensive
echo Cleaning all static directories...
if exist static (
echo Removing static directory...
rmdir /s /q static
)
if exist public\static (
echo Removing public\static directory...
rmdir /s /q public\static
)
if exist assets (
echo Removing assets directory...
rmdir /s /q assets
)
if exist public\assets (
echo Removing public\assets directory...
rmdir /s /q public\assets
)
if exist public\images (
echo Removing public\images directory...
rmdir /s /q public\images
)
if exist images (
echo Removing images directory...
rmdir /s /q images
)
if exist public (
echo Cleaning public directory static files...
if exist public\*.jpg del /f /q public\*.jpg
if exist public\*.jpeg del /f /q public\*.jpeg
if exist public\*.png del /f /q public\*.png
if exist public\*.gif del /f /q public\*.gif
if exist public\*.svg del /f /q public\*.svg
if exist public\*.ico del /f /q public\*.ico
if exist public\*.webp del /f /q public\*.webp
if exist public\*.pdf del /f /q public\*.pdf
if exist public\*.css del /f /q public\*.css
)
REM Recreate necessary static directories
echo Creating essential static directories...
mkdir static 2>nul
REM Clean data directory if it exists and has content
if exist data (
echo Cleaning data directory...
rmdir /s /q data
mkdir data
)
REM Clean node_modules (optional - uncomment if you want to remove dependencies)
REM echo Removing node_modules...
REM if exist node_modules rmdir /s /q node_modules
REM Clean package lock files
echo Removing package lock files...
if exist package-lock.json del /f package-lock.json
if exist yarn.lock del /f yarn.lock
REM Clean build artifacts and dist folders
if exist dist (
echo Removing dist directory...
rmdir /s /q dist
)
if exist build (
echo Removing build directory...
rmdir /s /q build
)
REM Clean any cache files
echo Cleaning cache files...
if exist .vscode\*.log (
echo Removing VS Code log files...
del /q .vscode\*.log
)
REM Clean npm/yarn cache
echo Cleaning npm cache...
npm cache clean --force
REM Clean browser cache files if they exist
if exist .cache (
echo Removing .cache directory...
rmdir /s /q .cache
)
REM Clean temporary files
if exist temp (
echo Removing temp directory...
rmdir /s /q temp
)
if exist tmp (
echo Removing tmp directory...
rmdir /s /q tmp
)
REM Clean any generated files
echo Cleaning generated files...
if exist *.generated.* del /f *.generated.*
echo Cleanup complete!
echo.
echo Note: You may need to run 'npm install' or 'yarn' to reinstall dependencies.
pause