1.0.2 • Published 1 year ago

npx-cache v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

npx-cache

有时候真的对 npx-cache 有点忍无可忍。现在很多库的脚手架都推荐用 npx(官方文档还再三强调不要用 npm global),可是这 npx cache 模块的管理是很头疼的事情。

虽然有一个 clear-npx-cache 的库,但他只管把本机的所有 npx cache 给你全清理了。

还是希望能清楚知道本机的 npx cache 目录(包括方便打开),以及现在到底装了哪些库(哪些版本)。

使用说明

// 显示本机 npx cache 的目录所在
npx npx-cache dir

// 列出本机 npx cache 所有 modules 及其版本号(以及对应的目录)
npx npx-cache list

// 根据关键词搜索本机的 npx cache 的 modules(不需要输入完整的 module name)
// search 后面是一个数组,多个用空格分隔
npx npx-cache search react webpack native vite

// 清空本机所有的 npx cache modules
npx npx-cache clear

// 指定名称删除 npx cache module,支持多个名字
// remove 后面是一个数组,多个空格分隔
npx npx-cache remove cowsay create-next-app