I am a python developer, virtualenv is used all the time when I'm developing. When it comes to node development, a lot of times development tools are installed globally, which is not ideal if your project wants different versions of them. This very short script simply adds $(pwd)/node_modules/.bin
to the front of PATH, so you can call those executables directly in bash. Instead of having to do./node_modules/.bin/some_exec
, you can just do some_exec
- Clone this git or download as zip
$ make install
(this step will copy theactivate_node_env
script into/usr/local/bin
- Goto your project root (where
node_modules
is) $ source activate_node_env
- You can now run your node executables in your shell.
- To exit, type this:
$ deactivate
make uninstall
(this simply removes it from /usr/local/bin
)