https://github.com/caomeiyouren/remove-node_modules
移除指定文件夹下所有node_modules
https://github.com/caomeiyouren/remove-node_modules
Last synced: 8 months ago
JSON representation
移除指定文件夹下所有node_modules
- Host: GitHub
- URL: https://github.com/caomeiyouren/remove-node_modules
- Owner: CaoMeiYouRen
- License: mit
- Created: 2020-02-10T03:57:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-21T13:36:21.000Z (over 3 years ago)
- Last Synced: 2025-01-04T22:45:35.102Z (9 months ago)
- Language: TypeScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# remove-node_modules
在node项目的开发中,经常会安装大量的node_modules,这导致node_modules文件夹的膨胀,每个node_modules动辄几百MB,甚至几个G。而如果存在多个node项目的话,node_modules的大小就更加膨胀了。
因此为了解决这个问题,把目前暂时不需要的项目的node_modules给移除了,腾出一些空间来。产生了本项目。
### 使用方法
1. clone本项目
```
git clone https://github.com/CaoMeiYouRen/remove-node_modules.git
```2. 下载依赖
```
npm i
```3. 编译
```
npm run build
```4. 修改配置文件
1. rootdirs.txt 项目根目录,会递归的删除该文件夹下所有的node_modules
2. ignore.txt 忽略文件夹,对于该文件中的文件夹会直接忽略5. 运行
```
npm start
```### 温馨提示
由于删除文件是一个敏感操作,因此请再三确认rootdirs.txt和ignore.txt文件,请确认要删除的文件夹根目录和忽略文件