且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何进行npm安装以仅将依赖项保存到package.json?

更新时间:2022-12-12 16:38:47

无法使用我知道的npm来实现.

There is no way to do that with npm that I'm aware of.

有两个用于执行此操作的npm软件包;我从未使用过它们中的任何一个,但是它们可能值得一试:

There are two npm packages for doing this; I've never used either of them, but they might be worth a try:

  • https://www.npmjs.com/package/npm-add
  • https://www.npmjs.com/package/adddep

希望这会有所帮助!