Writing this down since it always takes me a while to piece together after I’ve forgotten it. Basically local development of npm modules is all npm link
- Clone the module somewhere locally
cdinto the module directory- run
npm link cdinto some project using the module- run
npm link module-name
To clean this up afterwards, run npm unlink.
If you’re working on a dependency of a dependency, directly install the public version of that module before linking (I think?). Newer versions of NPM use a flat dependency graph and it should all just work. (couldn’t find a reference on this, sorry)