add 项目运行截图
This commit is contained in:
25
bat/run_install_front.bat
Normal file
25
bat/run_install_front.bat
Normal file
@@ -0,0 +1,25 @@
|
||||
@echo off
|
||||
:: 设置编码为 UTF-8
|
||||
chcp 65001 >nul
|
||||
|
||||
:: 1. 增加 /d 参数切换盘符,并检查路径是否存在
|
||||
cd /d D:\code\front\client_code
|
||||
if %errorlevel% neq 0 (
|
||||
echo [错误] 无法找到目录: D:\code\front\client_code
|
||||
pause
|
||||
exit /b
|
||||
)
|
||||
|
||||
echo 当前目录: %cd%
|
||||
|
||||
:: 2. 判断 node_modules 是否存在
|
||||
if not exist "node_modules\" (
|
||||
echo 未检测到 node_modules 目录,开始安装依赖...
|
||||
:: 使用 call 确保 npm 执行完后脚本继续运行
|
||||
call npm install
|
||||
) else (
|
||||
echo 检测到 node_modules 目录,跳过依赖安装。
|
||||
)
|
||||
|
||||
echo.
|
||||
echo 执行完毕!
|
||||
Reference in New Issue
Block a user