Files
mengpost/build.bat

17 lines
355 B
Batchfile

@echo off
rem 构建前端静态产物到 mengpost-frontend\dist
setlocal
set ROOT=%~dp0
cd /d %ROOT%mengpost-frontend
if not exist node_modules (
call npm install || goto :err
)
call npm run build || goto :err
echo.
echo 前端已构建: %ROOT%mengpost-frontend\dist
endlocal & exit /b 0
:err
echo 构建失败
endlocal & exit /b 1