NPM-EDIT(3)

πŸ“¦ version 1.2.1, in nixos 26.05, nixpkgs unstable

πŸ’– NAME πŸ’–

npm-edit is the manual page for editing an installed package, and yes bestie, the page you're on is NPM-EDIT(3) β€” iconic. It's literally β€œEdit an installed package.” πŸŽ€

✨ SYNOPSIS ✨

npm.commands.edit(package, callback)

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this one opens the package folder in your default editor (or literally whatever you've configured as the npm editor config β€” see npm help config). πŸ’…

After it has been edited, the package gets rebuilt so it can pick up any changes in compiled packages. slay ✨

For instance, you can do npm install connect to install connect into your package, and then npm.commands.edit(["connect"], callback) to make a few changes to your locally installed copy. Obsessed with a little local tweak? Same. πŸ’–

The first parameter is a string array with a single element: the package to open. The package can optionally have a version number attached. πŸ‘‘

⚠️ Since this command opens an editor in a new process, be careful about where and how this is used. No cap β€” new process means pay attention, bestie. 😭

okay byeee 🫢 β€” this page is NPM-EDIT(3) from March 2017, so that's the source/version and date sign-off at the very end. πŸ’œ

πŸ“¦ where this page comes from