Node.js Version eXecute - Run a command with a specific version of Node.js.
This is to nvm, like vex is to virtualenv. It's a simpler tool that runs a single command with a specific version of Node.js. The command can be anything. If a shell is started, this provides similar functionality to nvm, except that the environment exists until you exit the shell.
This is useful in situations where you don't want to change the environment, for instance in installation scripts.
No installation required, just copy or symlink nvx.sh
to a directory in your system path, e.g. ~/.local/bin
.
In some situations, it might be convenient to just run it once, without installation:
curl -s https://raw.githubusercontent.com/ropez/nvx/master/nvx.sh | sh -s v0.10.38 npm install
nvx.sh NODE_VERSION command...
Each version of Node.js is downloaded automatically the first time it's used.
nvx.sh v0.10.38 npm install -g babel
nvx.sh v0.10.38 babel script.jsx
nvx.sh v0.10.38 zsh
- Detect non-linux OS