MCSManager/build.bat

56 lines
1.2 KiB
Batchfile
Raw Normal View History

2023-11-15 21:22:06 +08:00
npm run preview-build
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"
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\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 "../../"
echo "--------"
2023-08-21 11:06:09 +08:00
echo "Done!"
2023-08-21 12:39:23 +08:00
pause