Ruby 的 `bundle open #{gem_name}` 是否有一个 node/npm 等价物?

Is there a node/npm equivalent for Ruby's `bundle open #{gem_name}`?

bundle open #{gem_name} 打开一个 gem 您已经安装在由 BUNDLER_EDITOREDITOR 指定的应用程序中,如果前者不存在。

显然可以打开实际位置,我只是想知道 node/npm 是否有类似的辅助功能。

您可以使用 npm edit <pkg> 命令来执行此操作

Description

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.

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

  • Default: EDITOR environment variable if set, or "vi" on Posix, or "notepad" on Windows.
  • Type: path

The command to run for npm edit or npm config edit.