mirror of
https://github.com/MCSManager/MCSManager.git
synced 2025-04-12 17:20:22 +08:00
Feat: windows build script
This commit is contained in:
parent
cf02114970
commit
9683addf56
3
.gitignore
vendored
3
.gitignore
vendored
@ -5,10 +5,7 @@ npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
test.txt
|
||||
*.bat
|
||||
|
||||
src/public
|
||||
*.code-workspace
|
||||
vscode/
|
||||
.vscode/
|
||||
|
47
build.bat
Executable file
47
build.bat
Executable file
@ -0,0 +1,47 @@
|
||||
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
|
||||
npm run build
|
||||
|
||||
echo "Build panel..."
|
||||
cd ..
|
||||
cd panel
|
||||
npm run build
|
||||
|
||||
echo "Build frontend..."
|
||||
cd ..
|
||||
cd frontend
|
||||
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\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"
|
||||
|
||||
echo "------------"
|
||||
echo "Done!"
|
||||
echo "------------"
|
10
install-dependents.bat
Executable file
10
install-dependents.bat
Executable file
@ -0,0 +1,10 @@
|
||||
cd daemon
|
||||
npm install
|
||||
cd ../panel
|
||||
npm install
|
||||
cd ../frontend
|
||||
npm install
|
||||
|
||||
echo "------------"
|
||||
echo "Done!"
|
||||
echo "------------"
|
@ -1,3 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
cd daemon
|
||||
npm install
|
||||
cd ../panel
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
open -a Terminal.app "start-daemon.sh"
|
||||
open -a Terminal.app "start-panel.sh"
|
||||
open -a Terminal.app "start-frontend.sh"
|
||||
./start-frontend.sh
|
||||
|
3
npm-dev-windows.sh
Normal file
3
npm-dev-windows.sh
Normal file
@ -0,0 +1,3 @@
|
||||
start ./start-daemon.bat
|
||||
start ./start-panel.bat
|
||||
./start-frontend.bat
|
4
start-daemon.bat
Executable file
4
start-daemon.bat
Executable file
@ -0,0 +1,4 @@
|
||||
cd daemon
|
||||
npm run dev
|
||||
|
||||
|
4
start-frontend.bat
Executable file
4
start-frontend.bat
Executable file
@ -0,0 +1,4 @@
|
||||
cd frontend
|
||||
npm run dev
|
||||
|
||||
|
4
start-panel.bat
Executable file
4
start-panel.bat
Executable file
@ -0,0 +1,4 @@
|
||||
cd panel
|
||||
npm run dev
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user