Files
nxxmdata/government-mini-program/start-miniprogram.bat

47 lines
1014 B
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
echo 启动政府端微信小程序开发环境...
echo.
echo 检查Node.js环境...
node --version
if %errorlevel% neq 0 (
echo 错误: 未找到Node.js请先安装Node.js 16.20.2+
pause
exit /b 1
)
echo.
echo 检查后端服务...
curl -s http://localhost:5352/health >nul 2>&1
if %errorlevel% neq 0 (
echo 警告: 后端服务未运行,请先启动后端服务
echo 在另一个命令行窗口中运行: cd ../government-backend && npm start
echo.
echo 按任意键继续(后端服务将在后台启动)...
pause >nul
)
echo.
echo 安装依赖包...
call npm install
if %errorlevel% neq 0 (
echo 错误: 依赖安装失败
pause
exit /b 1
)
echo.
echo 构建微信小程序...
call npm run build:mp-weixin
if %errorlevel% neq 0 (
echo 错误: 构建失败
pause
exit /b 1
)
echo.
echo 构建完成!请使用微信开发者工具打开 dist/mp-weixin 目录
echo 或者运行: npm run dev:mp-weixin 启动开发模式
echo.
pause