package
Change between installed Node version in your shell.
npm install chnodeGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
![NPM version][npm-badge] [npm-badge]: https://badge.fury.io/js/chnode.png
Change between installed Node versions in your current shell with a simple
chnode VERSION. Leaves the system version untouched. Works out of the box with
Mac's Homebrew.
NODES variable.Side note: I'm terribly ashamed of not yet having tests!
There are a few existing tools for switching Node versions, so how does Chnode.sh differ?
If you do insist on compiling and installing Nodes via 3rd party tools, check these out:
Install Chnode.sh globally with:
npm install --global chnodeThen source it in your shell:
. "$(npm bin --global)/chnode"For convenience you might want to put the output of the following in your
.zshrc or .bashrc.
It'll be faster than running the line above with npm bin which will slow down
your shell loading.
echo ". \"$(npm bin --global)/chnode\""Change between installed Node versions with:
chnode 0.12.2To change to the latest installed v0.11.x (e.g. Node 0.11.15):
chnode 0.11To change to the latest v0.x:
chnode 0To go back to the system version:
chnode system| Option | Description |
|---|---|
-h, -?, --help | Display this help. |
-l, --list | List all available Node versions. |
-r, --refresh | Refresh and find all available Node versions. |
-v, --verbose | Be verbose when changing versions. |
-V, --version | Display version information. |
On the Mac Chnode.sh will find installed Nodes in /usr/local/Cellar/node.
If you've got installations somewhere else, set the NODES variable to an
array of paths of individual versions:
NODES+=(~/.nodes/*)For example, if you've got Node compiled from the source at
~/Development/node-master, append that:
NODES+=(~/Development/node-master)If you think Chnode.sh should detect some of your paths automatically, please let me know by creating an issue. Thanks!
Chnode.sh is released under a Lesser GNU Affero General Public License, which in summary means:
For more convoluted language, see the LICENSE file.
Andri Möll typed this and the code.
Monday Calendar supported the engineering work.
If you find Chnode.sh needs improving, please don't hesitate to type to me now at andri@dot.ee or create an issue online.