扫一扫分享
由于前端包管理工具的弊端,如果我们在本地开发了多个项目,每个项目都会生成一个庞大的 node_modules,我们的电脑内存就这样在无形流失了。npkill 提供了一个方便的工具,可以帮助我们查找安装的npm 包,以及进行清理。
安装
npm install -g npkill快速清理沉重的 node_modules
命令说明
| Arg | Description | Default |
|---|---|---|
| -c, --bg-color | Change row highlight color. Available: blue, cyan, magenta, white, red and yellow | blue |
| -d, --directory | Set the directory from which to begin searching | . |
| -D, --delete-all | CURRENTLY DISABLED. Automatically delete all node_modules folders that are found. | -- |
| -e, --show-errors | Show error messages if any | false |
| -E, --exclude | Exclude directories from search (directory name list must be inside double quotes "", each directory separated by ',' ) Example: "ignore1, ignore2" | -- |
| -f, --full | Start searching from the home of the user (example: "/home/user" in linux) | false |
| -gb | Show folders size in Gigabytes instead of Megabytes | false |
| -h, --help, ? | Show help | false |
| -nu, --no-check-update | Dont check for updates on startup | false |
| -s, --sort | Sort results by: size or path [ beta ] | none |
| -t, --target | Specify the name of the directories you want to search | node_modules |
| -v, --version | Show npkill version | false |
仅供个人学习参考/导航指引使用,具体请以第三方网站说明为准,本站不提供任何专业建议。如果地址失效或描述有误,请联系站长反馈~感谢您的理解与支持!
手机预览