1nstall 中文文档教程
1nstall
安装一个包,就像它是唯一的包一样。
Why?
当您已经安装了很多 node_modules
时,安装新的依赖项是否会花费很多时间?
How?
它将依赖项安装在一个临时位置,然后将它与 .bin
一起移动*到您的项目,并更新您的 package.json
。
Usage
npm install -g 1nstall
one jquery
# or
one npm --saveDev jquery
Caveats
仅当安装包实际上比您的项目小(包括依赖项)时才有用。 通常是这种情况。
它只更新
package.json
而不是package-lock.json
文件。
1nstall
Install a package as if it was the only package.
Why?
Does installing a new dependency take a lot of time when you have a lot of node_modules
already installed?
How?
It installs the dependency it in a temporary location then it moves* it to your project, along with .bin
s, and updated your package.json
.
Usage
npm install -g 1nstall
one jquery
# or
one npm --saveDev jquery
Caveats
It's only beneficial when the installing package is actually smaller (dependencies included) than your project. Which usually is the case.
It only updates
package.json
notpackage-lock.json
file.