autarky Node.js项目磁盘清理工具

autarky 的 node_modules 清理工具,专治磁盘空间告急的老问题。

MacBook 的硬盘小你知道的,动不动就爆红。项目一多,node_modules 文件夹就像牛皮癣一样,满地都是。每个项目都拷一份 npm 包,重复还不占便宜,硬盘一下就满了。

autarky就挺聪明,它会从你当前目录往下找,看看哪些项目的 node_modules 已经吃灰好几个月了。你只要告诉它“3 个月前的都删”,它就会把该干掉的列出来,选一下,确认,删完,干净利落。

安装也简单:

# npm i -g autarky
# 或者 yarn global add autarky

直接敲命令就行:

$ autarky

对了,这玩意不会自动删,一定要你手动确认。不放心的话,可以先预览一波,再决定动手。

你要是平时项目多、喜欢开新坑,但有些又久不动了,那这个工具真的挺省事。比手动去 node_modules 一个个删高效多了,适合有点强迫症又懒得整理的前端。

另外,有兴趣的可以看看另一个工具 npkill,操作方式也差不多,界面化一点,看你喜欢哪个。

zip
autarky-master.zip 预估大小:53个文件
folder
autarky-master 文件夹
folder
.github 文件夹
file
FUNDING.yml 50B
folder
workflows 文件夹
file
build.yml 460B
file
yarn.lock 205KB
file
webpack.config.js 1KB
file
.prettierignore 26B
folder
src 文件夹
folder
redux 文件夹
file
index.ts 271B
folder
__tests__ 文件夹
file
ConfigReducer.test.ts 963B
file
actionTypes.test.ts 407B
file
selectors.ts 422B
folder
reducers 文件夹
file
ConfigReducer.ts 800B
file
UIReducer.ts 417B
file
index.ts 262B
folder
ui 文件夹
folder
containers 文件夹
folder
Interrogator 文件夹
file
index.tsx 1KB
file
Questions.tsx 7KB
file
renderApp.tsx 159B
folder
components 文件夹
folder
Table 文件夹
file
index.tsx 482B
folder
LogMessage 文件夹
file
index.tsx 578B
folder
TextInput 文件夹
file
index.tsx 1024B
folder
Header 文件夹
file
index.tsx 374B
file
App.tsx 336B
file
index.ts 132B
folder
lib 文件夹
file
utils.ts 2KB
file
removeDir.ts 229B
file
validation.ts 193B
file
getLocation.ts 2KB
folder
__tests__ 文件夹
file
time.test.ts 145B
file
utils.test.ts 792B
file
removeDir.test.ts 830B
file
Interfaces.ts 212B
folder
childProcesses 文件夹
file
child_find.ts 771B
file
child_delete.ts 352B
file
time.ts 481B
file
CNAME 15B
file
CONTRIBUTING.md 570B
file
tsconfig.base.json 491B
file
tsconfig.json 185B
file
LICENSE 1KB
file
jest.config.js 384B
file
.prettierrc 29B
file
README.md 3KB
file
.npmrc 53B
folder
docs 文件夹
folder
assets 文件夹
file
heavy.png 63KB
file
Banner.png 212KB
folder
logo 文件夹
file
autarky_128.png 37KB
file
autarky_256.png 121KB
file
autarky_512.png 449KB
file
autarky_full.png 7.29MB
file
autarky_64.png 12KB
file
autarky.xcf 20.09MB
file
Demo.gif 5.81MB
file
Demo.json 1.79MB
file
.gitignore 76B
file
package.json 2KB
...
zip 文件大小:25.54MB