Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 package.json 中有很多 grunt 包。如何在一个命令中卸载它们?像 npm 卸载和一些 grep 之类的东西?先感谢您。
我不确定您要做什么-您的目标是重新安装软件包,还是它们不再是您项目的依赖项?
一般来说,如果我对以下内容进行了重大更改,我会做的package.json是:
package.json
rm -fr node_modules npm install
这将删除当前安装的依赖项并仅重新安装当前 package.json 指定的依赖项(和 devDependencies)。