更新脚本,以兼容在不同目录打开

This commit is contained in:
潘佳 2024-01-05 10:55:34 +08:00
parent 776c3ec40c
commit 39a5ab8922
2 changed files with 34 additions and 2 deletions

View File

@ -1 +1,17 @@
call npm run dev
@echo off
set rootPath=%cd%
if "%rootPath:~-6,6%"=="5.code" (
echo ==
) else (
set rootPath=%cd%\5.code
)
cd /d %rootPath%
call npm run dev
:end0
echo 9s exit
ping 127.0.0.1 -n 3 >nul
echo 6s exit
ping 127.0.0.1 -n 3 >nul
echo 3s exit
ping 127.0.0.1 -n 3 >nul
exit

View File

@ -1 +1,17 @@
call npm run prod
@echo off
set rootPath=%cd%
if "%rootPath:~-6,6%"=="5.code" (
echo ==
) else (
set rootPath=%cd%\5.code
)
cd /d %rootPath%
call npm run prod
:end0
echo 9s exit
ping 127.0.0.1 -n 3 >nul
echo 6s exit
ping 127.0.0.1 -n 3 >nul
echo 3s exit
ping 127.0.0.1 -n 3 >nul
exit