npm-install-test
选择命令行版本:
See Details
目录
概要
¥Synopsis
npm install-test [<package-spec> ...]alias: it
描述
¥Description
此命令运行一个 npm install
,后跟一个 npm test
。它采用与 npm install
完全相同的参数。
¥This command runs an npm install
followed immediately by an npm test
. It takes exactly the same arguments as npm install
.
配置
¥Configuration
save
-
默认值:
true
除非在使用npm update
时默认为false
¥Default:
true
unless when usingnpm update
where it defaults tofalse
-
类型:布尔值
¥Type: Boolean
将已安装的包作为依赖保存到 package.json
文件中。
¥Save installed packages to a package.json
file as dependencies.
与 npm rm
命令一起使用时,从 package.json
中删除依赖。
¥When used with the npm rm
command, removes the dependency from package.json
.
如果设置为 false
,也会阻止写入 package-lock.json
。
¥Will also prevent writing to package-lock.json
if set to false
.
save-exact
-
默认值:false
¥Default: false
-
类型:布尔值
¥Type: Boolean
保存到 package.json 的依赖将使用精确的版本进行配置,而不是使用 npm 的默认 semver 范围运算符。
¥Dependencies saved to package.json will be configured with an exact version rather than using npm's default semver range operator.
global
-
默认值:false
¥Default: false
-
类型:布尔值
¥Type: Boolean
在 "global" 模式下运行,以便将包安装到 prefix
文件夹而不是当前工作目录。有关行为差异的更多信息,请参见 文件夹。
¥Operates in "global" mode, so that packages are installed into the prefix
folder instead of the current working directory. See folders for more on the differences in behavior.
-
包安装到
{prefix}/lib/node_modules
文件夹,而不是当前工作目录。¥packages are installed into the
{prefix}/lib/node_modules
folder, instead of the current working directory. -
bin 文件链接到
{prefix}/bin
¥bin files are linked to
{prefix}/bin
-
手册页链接到
{prefix}/share/man
¥man pages are linked to
{prefix}/share/man
install-strategy
-
默认值:"hoisted"
¥Default: "hoisted"
-
类型:"hoisted"、"nested"、"shallow" 或 "linked"
¥Type: "hoisted", "nested", "shallow", or "linked"
设置在 node_modules 中安装包的策略。提升(默认):在顶层安装非复制,并在目录结构中根据需要复制。nested:(以前的 --legacy-bundling)就地安装,无需提升。浅层(以前的 --global-style)只在顶层安装直接的 deps。linked:(实验)安装在 node_modules/.store 中,链接到位,未提升。
¥Sets the strategy for installing packages in node_modules. hoisted (default): Install non-duplicated in top-level, and duplicated as necessary within directory structure. nested: (formerly --legacy-bundling) install in place, no hoisting. shallow (formerly --global-style) only install direct deps at top-level. linked: (experimental) install in node_modules/.store, link in place, unhoisted.
legacy-bundling
-
默认值:false
¥Default: false
-
类型:布尔值
¥Type: Boolean
-
DEPRECATED:此选项已被
--install-strategy=nested
弃用¥DEPRECATED: This option has been deprecated in favor of
--install-strategy=nested
不要在 node_modules
中提升包安装,而是以与它们所依赖的方式相同的方式安装包。这可能会导致非常深的目录结构和重复的软件包安装,因为没有数据去重。设置 --install-strategy=nested
。
¥Instead of hoisting package installs in node_modules
, install packages in the same manner that they are depended on. This may cause very deep directory structures and duplicate package installs as there is no de-duplicating. Sets --install-strategy=nested
.
global-style
-
默认值:false
¥Default: false
-
类型:布尔值
¥Type: Boolean
-
DEPRECATED:此选项已被
--install-strategy=shallow
弃用¥DEPRECATED: This option has been deprecated in favor of
--install-strategy=shallow
仅在顶层 node_modules
中安装直接依赖,但提升更深层次的依赖。设置 --install-strategy=shallow
。
¥Only install direct dependencies in the top level node_modules
, but hoist on deeper dependencies. Sets --install-strategy=shallow
.
omit
-
默认值:'dev' 如果
NODE_ENV
环境变量设置为 'production',否则为空。¥Default: 'dev' if the
NODE_ENV
environment variable is set to 'production', otherwise empty. -
类型:"dev"、"optional"