My Environment:
~/pega-usuarios
~/pega-usuarios/index.js #retorna um array de usuarios
~/pega-usuarios/package.json #"name":"pega" #pega será usado para npm link pega.
If I give a npm link
inside this folder, a global symbolic link will be created in {prefix}/lib/node_modules/<package>
Now I'm on my site and I want to get this list of users
~/usuarios
~/usuarios/index.js
~/usuarios/package.json #
I want to be able to do this,
Reason for this, when you make a change in npm link pega
it will also be done in pega
Observations
-When you require a globally linked packet, such as ~/pega-usuarios/
, it does not go to dependencies in ~/pega-usuarios
it goes only to ~/usuarios/node_modules/pega
Source
link