MCSManager/build.bat

60 lines
1.5 KiB
Batchfile
Raw Normal View History

2023-12-28 22:00:45 +08:00
call npm run preview-build
2023-11-15 21:22:06 +08:00
2023-08-21 11:06:09 +08:00
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
2023-08-21 12:39:23 +08:00
call npm run build
2023-08-21 11:06:09 +08:00
echo "Build panel..."
cd ..
cd panel
2023-08-21 12:39:23 +08:00
call npm run build
2023-08-21 11:06:09 +08:00
echo "Build frontend..."
cd ..
cd frontend
2023-08-21 12:39:23 +08:00
call npm run build
2023-08-21 11:06:09 +08:00
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"
2024-05-09 16:05:56 +08:00
copy ".\daemon\production\app.js.map" ".\production-code\daemon\app.js.map"
2023-08-21 11:06:09 +08:00
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"
2024-05-12 21:09:38 +08:00
copy ".\panel\production\app.js.map" ".\production-code\web\app.js.map"
2023-08-21 11:06:09 +08:00
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"
2023-08-21 12:39:23 +08:00
cd "production-code\daemon"
call npm install --production
cd "../web"
call npm install --production
cd "../../"
2024-04-18 11:28:09 +08:00
echo "------------"
echo "Compilation completed!"
echo "Output Directory: ./production-code/"
echo "------------"
2023-08-21 12:39:23 +08:00
pause