探测 boot 脚本是否存在于 package.json 里

This commit is contained in:
luk.lu
2021-07-22 16:38:47 +08:00
parent f2809ad31a
commit 7251918b03
5 changed files with 66 additions and 28 deletions

45
npm-clear-all.bat Normal file
View File

@@ -0,0 +1,45 @@
@echo off
echo *** Testing Path [%1] [D:\faroenar] [C:\faroenar] [%HOMEDRIVE%%HOMEPATH%\faronear] [../..]
@ if not "%1" == "" (
set BASEDIR=%1
) else (if exist D:\faronear (
set BASEDIR=D:\faronear
) else (if exist C:\faronear (
set BASEDIR=C:\faronear
) else (if exist %HOMEDRIVE%%HOMEPATH%\faronear (
set BASEDIR=%HOMEDRIVE%%HOMEPATH%\faronear
) else (
set BASEDIR=..\..
))))
if not exist %BASEDIR% (
echo *** [%BASEDIR%] not exist! Exit now. ***
@ GOTO END
)
pushd %BASEDIR%
echo *** Current path = [%CD%] ***
@REM for /d %%d in (*) do ( pushd %%d & ( for /d %%d in (*) do ( if exist %%d/.git pushd %%d & echo --- git pulling: %%d ... & git pull & popd ) ) & popd )
for /d %%d in (*) do (
pushd %%d
for /d %%d in (*) do (
if exist %%d/node_modules (
pushd %%d
echo Deleting %%d/node_modules ...
rd /s /q node_modules
popd
)
)
popd
)
popd
pause
@GOTO END
:END