riywo / ndenv

node.js version manager based on rbenv
304 stars 31 forks source link

Add the global `node_modules` path to `NODE_PATH` #1

Closed cu39 closed 10 years ago

cu39 commented 10 years ago

In Ruby or Python for example, we can require gems or import packages which have been installed globally. Even with rbenv/pyenv, no config required.

In Node however, we have to add manually the global node_modules path to NODE_PATH. It needs to be changed frequently in ndenv environment.

With this commit the global node_modules each version has will be added automatically just before execution in ndenv-exec.

riywo commented 10 years ago

Thanks!

cu39 commented 10 years ago

:laughing: