Files
mengyaprofile/start-frontend.bat
2025-12-13 21:35:46 +08:00

25 lines
553 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
setlocal
title Mengya Profile - Start Frontend
echo [INFO] 启动前端开发服务器...
cd /d "%~dp0mengyaprofile-frontend"
echo [INFO] 当前目录:%CD%
where npm >nul 2>nul
if errorlevel 1 (
echo [ERROR] 未检测到 npm请先安装 Node.js含 npm
exit /b 1
)
if not exist "node_modules" (
echo [INFO] 检测到缺少依赖,正在安装...
npm install --prefix "%CD%"
if errorlevel 1 (
echo [ERROR] 依赖安装失败。
exit /b 1
)
)
echo [INFO] 运行npm start
npm start --prefix "%CD%"
endlocal