npm-edit

编辑已安装的包

选择命令行版本:

概要

¥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 将连接安装到你的包中,然后执行 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

  • 默认值:EDITOR 或 VISUAL 环境变量,或 Windows 上的 'notepad.exe',或 Unix 系统上的 'vim'

    ¥Default: The EDITOR or VISUAL environment variables, or 'notepad.exe' on Windows, or 'vim' on Unix systems

  • 类型:字符串

    ¥Type: String

npm editnpm config edit 运行的命令。

¥The command to run for npm edit and npm config edit.

也可以看看

¥See Also

npm 中文网 - 粤ICP备13048890号