Files
sysconfig/npm_boot_tree.bat
luk 9742f6dab2 refactor: 脚本及配置文件命名统一用 _ 分隔
将 .sh/.bat 脚本与 .js/.plist/.Dockerfile 等文件中以 - 分隔的文件名
改为 _ 分隔,dcloud-renew 目录改为 dcloud、script_nuance 目录改为
nuance,并同步更新脚本内部引用与 README 路径。

Co-Authored-By: AtomCode (deepseek-v4-flash) <noreply@atomgit.com>
2026-08-25 15:11:50 +08:00

73 lines
1.7 KiB
Batchfile
Raw Permalink 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
@REM 首先清除可能残留的变量
set ROOTPATH=
@ if not "" == "%1" (
set ROOTPATH=%1
) else (
echo;
echo ::*** Enter [root path] or [leave blank] for default to [[%CD%]]
set /p ROOTPATH=">>> "
echo;
if "" == "%ROOTPATH%" (
set ROOTPATH=%CD%
)
)
if not exist "%ROOTPATH%" (
echo ××× [[%ROOTPATH%]] not exist! Exit now. ***
@ GOTO END
) else (
echo √√√ ROOTPATH = [[%ROOTPATH%]]
)
pushd %ROOTPATH%
echo ::*** Starting from [[%CD%]]
echo;
@ if "%2" == "hier" (
@REM for /d %%d in (*) do ( pushd %%d & ( for /d %%d in (*) do if exist %%d/package.json ( pushd %%d & echo --- npm booting: %%d ... & npm run boot & popd ) ) & popd )
for /d %%o in (*) do (
@ if not "%%o" == ".vscode" (
echo ::******** entering [[%ROOTPATH%\%%o]]
echo;
pushd %%o
for /d %%g in (*) do (
@ if exist "%%g\package.json" (
findstr "\"boot\"" %%g\package.json >NUL && (
pushd %%g
echo ::***** npm booting [[%ROOTPATH%\%%o\%%g]]
npm run boot
echo;
popd
)
)
)
popd
)
)
) else (
for /d /r %%r in (*) do (
@REM @ if not "%%r" == "node_modules" (
echo "%%r" | findstr "node_modules uni_modules .deploy_git .git .svn .vscode unpackage _webroot _logstore _datasotre _archive _filestore _ssl" >NUL || (
if exist "%%r\package.json" (
findstr "\"boot\"" "%%r\package.json" >NUL && (
pushd %%r
echo ::***** npm booting [[%ROOTPATH%\%%r]]
npm run boot
echo;
popd
)
)
)
)
)
popd
:END
pause