选择命令行版本:
🌐 Synopsis
npm edit <pkg>[/<subpkg>...]
注意:此命令不支持工作区。
🌐 Note: This command is unaware of workspaces.
🌐 Description
在当前项目中选择一个依赖,并在默认编辑器中打开包文件夹(或你已配置为 npm editor 配置的编辑器 —— 参见 npm-config)。
🌐 Selects a dependency in the current project and opens the package folder in the default editor (or whatever you've configured as the npm editor config -- see npm-config.)
在它被编辑之后,包被重新构建,以便获取编译包中的任何更改。
🌐 After it has been edited, the package is rebuilt so as to pick up any changes in compiled packages.
例如,你可以使用 npm install connect 将 connect 安装到你的包中,然后使用 npm edit connect 对你本地安装的副本进行一些修改。
🌐 For instance, you can do npm install connect to install connect into your package, and then npm edit connect to make a few changes to your locally installed copy.
🌐 Configuration
editor运行 npm edit 和 npm config edit 的命令。
🌐 The command to run for npm edit and npm config edit.
🌐 See Also