forked from MCSManager/MCSManager
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bat
More file actions
executable file
·58 lines (45 loc) · 1.46 KB
/
build.bat
File metadata and controls
executable file
·58 lines (45 loc) · 1.46 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
call npm run preview-build
rd /s /q "production-code"
rd /s /q ".\daemon\dist"
rd /s /q ".\daemon\production"
rd /s /q ".\panel\dist"
rd /s /q ".\panel\production"
echo "Build daemon..."
cd daemon
call npm run build
echo "Build panel..."
cd ../panel
call npm run build
echo "Build frontend..."
cd ../frontend
call npm run build
echo "Collecting files..."
cd ..
mkdir "production-code"
mkdir "production-code\daemon"
mkdir "production-code\web"
mkdir "production-code\web\public"
copy ".\daemon\production\app.js" ".\production-code\daemon\app.js"
copy ".\daemon\production\app.js.map" ".\production-code\daemon\app.js.map"
copy ".\daemon\package.json" ".\production-code\daemon\package.json"
copy ".\daemon\package-lock.json" ".\production-code\daemon\package-lock.json"
copy ".\panel\production\app.js" ".\production-code\web\app.js"
copy ".\panel\production\app.js.map" ".\production-code\web\app.js.map"
copy ".\panel\package.json" ".\production-code\web\package.json"
copy ".\panel\package-lock.json" ".\production-code\web\package-lock.json"
xcopy ".\frontend\dist" ".\production-code\web\public" /E /I /H /Y
rd /s /q ".\panel\production"
rd /s /q ".\daemon\production"
rd /s /q ".\daemon\dist"
rd /s /q ".\panel\dist"
rd /s /q ".\frontend\dist"
cd "production-code\daemon"
call npm install --production
cd "../web"
call npm install --production
cd "../../"
echo "------------"
echo "Compilation completed!"
echo "Output Directory: ./production-code/"
echo "------------"
pause