如何一键清除文件目录下所有的node_modules

865 阅读1分钟

如何一键清除文件目录下所有的node_modules

快速删除目录下的node_modules,下面附上windowsmac的脚本指令

windows脚本

FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" rm -rf "%d"

mac脚本

find . -name "node_modules" -type d -prune -exec rm -rf '{}' +