feat: 自动提交 - 周一 2025/09/22 15:12:38.91
This commit is contained in:
54
build_frontend.bat
Normal file
54
build_frontend.bat
Normal file
@@ -0,0 +1,54 @@
|
||||
@echo off
|
||||
echo 构建TSP智能助手前端...
|
||||
echo.
|
||||
|
||||
cd frontend
|
||||
|
||||
echo 检查Node.js环境...
|
||||
node --version >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo 错误: 未找到Node.js,请先安装Node.js
|
||||
echo 下载地址: https://nodejs.org/
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo 检查npm环境...
|
||||
npm --version >nul 2>&1
|
||||
if %errorlevel% neq 0 (
|
||||
echo 错误: 未找到npm,请检查Node.js安装
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo 检查依赖包...
|
||||
if not exist "node_modules" (
|
||||
echo 安装依赖包...
|
||||
npm install
|
||||
if %errorlevel% neq 0 (
|
||||
echo 错误: 依赖包安装失败
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
)
|
||||
|
||||
echo 运行类型检查...
|
||||
npm run type-check
|
||||
if %errorlevel% neq 0 (
|
||||
echo 警告: 类型检查失败,但继续构建...
|
||||
)
|
||||
|
||||
echo 构建生产版本...
|
||||
npm run build
|
||||
if %errorlevel% neq 0 (
|
||||
echo 错误: 构建失败
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo 构建完成!
|
||||
echo 构建文件已输出到: src/web/static/dist
|
||||
echo.
|
||||
|
||||
pause
|
||||
Reference in New Issue
Block a user