`npm i` 命令有什么作用?
What does the `npm i` command do?
i
命令在 npm CLI 中的作用是什么?
我看到它是这样使用的:
npm i package
i
标志是install
的别名,所以
npm i package
与
相同
npm install package
来自文档:
npm install (with no args, in package dir)
npm install [<@scope>/]<name>
npm install [<@scope>/]<name>@<tag>
npm install [<@scope>/]<name>@<version>
npm install [<@scope>/]<name>@<version range>
npm install <alias>@npm:<name>
npm install <git-host>:<git-user>/<repo-name>
npm install <git repo url>
npm install <tarball file>
npm install <tarball url>
npm install <folder>
aliases: npm i, npm add
common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional|--save-peer] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run]
i
命令是npm-install
别名的别名,其中提到in the docs.
您可以将它与所有 npm-install
标志一起使用。例如下面我将使用 npm i
命令安装 Angular
和 live-server
:
npm i angular2@2.0.0-alpha.45 -E
npm i live-server -D
i
命令在 npm CLI 中的作用是什么?
我看到它是这样使用的:
npm i package
i
标志是install
的别名,所以
npm i package
与
相同npm install package
来自文档:
npm install (with no args, in package dir)
npm install [<@scope>/]<name>
npm install [<@scope>/]<name>@<tag>
npm install [<@scope>/]<name>@<version>
npm install [<@scope>/]<name>@<version range>
npm install <alias>@npm:<name>
npm install <git-host>:<git-user>/<repo-name>
npm install <git repo url>
npm install <tarball file>
npm install <tarball url>
npm install <folder>
aliases: npm i, npm add
common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional|--save-peer] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run]
i
命令是npm-install
别名的别名,其中提到in the docs.
您可以将它与所有 npm-install
标志一起使用。例如下面我将使用 npm i
命令安装 Angular
和 live-server
:
npm i angular2@2.0.0-alpha.45 -E
npm i live-server -D