Submit PR via https://docs.npmjs.com/cli/link
- You want B to depend on A but
- A is not on npm (or it is - but you don't feel like publishing after each fix)
- While standing in A
npm link
makes a global package of A. Verify bynpm ls -g --depth=0
. - A can then be used by B by doing
npm link A
while inside B. Verify bynpm ls --depth=0
.
- To remove the link between A and B go into B and do
$ npm unlink A
. Verify bynpm ls --depth=0
. - To remove A as a global package do
npm uninstall A -g
. Verify bynpm ls -g --depth=0
.
Note: Automagically --save
a link to package.json is currently not implemented so npm ls
will have to do.