Aaron Aaron - 2 years ago 87
Node.js Question

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

bundle open #{gem_name}
opens a gem you have installed in the application specified by
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.

Answer Source

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


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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download