选择命令行版本:
🌐 Synopsis
npm explore <pkg> [ -- <command>]
注意:此命令不支持工作区。
🌐 Note: This command is unaware of workspaces.
🌐 Description
在指定的已安装包的目录中生成一个子 shell。
🌐 Spawn a subshell in the directory of the installed package specified.
如果指定了命令,则它在子 shell 中运行,然后立即终止。
🌐 If a command is specified, then it is run in the subshell, which then immediately terminates.
在 node_modules 文件夹中的 git 子模块情况下,这尤其方便:
🌐 This is particularly handy in the case of git submodules in the node_modules folder:
npm explore some-dependency -- git pull origin master
请注意,该软件包之后不会自动重建,因此如果你进行任何更改,请务必使用 npm rebuild <pkg>。
🌐 Note that the package is not automatically rebuilt afterwards, so be sure to use npm rebuild <pkg> if you make any changes.
🌐 Configuration
shell用于运行 npm explore 命令的 shell。
🌐 The shell to run for the npm explore command.
🌐 See Also