2

bundle open #{gem_name} opens a gem you have installed in the application specified by BUNDLER_EDITOR or EDITOR if the former is not present.

Obviously it is possible to open the actual location instead, I'm just wondering if node/npm have a similar helper feature.

Aaron
  • 13,349
  • 11
  • 66
  • 105

1 Answers1

2

You can use the npm edit <pkg> command to do this

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.

Community
  • 1
  • 1
peteb
  • 18,552
  • 9
  • 50
  • 62