探测 boot 脚本是否存在于 package.json 里
This commit is contained in:
45
npm-clear-all.bat
Normal file
45
npm-clear-all.bat
Normal 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
|
||||
Reference in New Issue
Block a user