[Docs] update README for LTS.
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Jordan Harband · committed by Jordan Harband · parent 876d117 · Browse files · 1 file·+27 added−9 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+27 added−9 removed
- other:+27 added−9 removed
Provenance
- Commit
28822ff- Tree
bbe1d2d- Author
Jordan Harband <ljharb@gmail.com>- Committer
Jordan Harband <ljharb@gmail.com>- Parent
876d117
1 file changed+27 added−9 removed
modified:README.markdown+27 added-9 removed
26 unmodified lines27 - When using nvm you do not need `sudo` to globally install a module with `npm -g`, so instead of doing `sudo npm install -g grunt`, do instead `npm install -g grunt`28 - If you have an `~/.npmrc` file, make sure it does not contain any `prefix` settings (which is not compatible with nvm)29 - You can (but should not?) keep your previous "system" node install, but nvm will only be available to your user account (the one used to install nvm). This might cause version mismatches, as other users will be using `/usr/local/lib/node_modules/*` VS your user account using `~/.nvm/versions/node/vX.X.X/lib/node_modules/*`30 31-Homebrew installation is not supported.31+Homebrew installation is not supported. If you have issues with homebrew-installed `nvm`, please `brew uninstall` it, and install it using the instructions below, before filing an issue.32 33 Note: If you're using `zsh` you can easily install `nvm` as a zsh plugin. Install [`zsh-nvm`](https://github.com/lukechilds/zsh-nvm) and run `nvm_update` to update.34 35 ### Install script75 unmodified lines111 ```112 113 ## Usage114 115-To download, compile, and install the latest v5.0.x release of node, do this:115+To download, compile, and install the latest release of node, do this:116 117 ```sh118-nvm install 5.0118+nvm install node119 ```120 121 And then in any new shell just use the installed version:122 123 ```sh124-nvm use 5.0124+nvm use node125 ```126 127 Or you can just run it:128 129 ```sh130-nvm run 5.0 --version130+nvm run node --version131 ```132 Or, you can run any arbitrary command in a subshell with the desired version of node:133 134 ```sh12 unmodified lines147 - `iojs`: this installs the latest version of [`io.js`](https://iojs.org/en/)148 - `stable`: this alias is deprecated, and only truly applies to `node` `v0.12` and earlier. Currently, this is an alias for `node`.149 - `unstable`: this alias points to `node` `v0.11` - the last "unstable" node release, since post-1.0, all node versions are stable. (in semver, versions communicate breakage, not stability).150 151+### Long-term support152+Node has a [schedule](https://github.com/nodejs/LTS#lts_schedule) for long-term support (LTS) You can reference LTS versions in aliases and `.nvmrc` files with the notation `lts/*` for the latest LTS, and `lts/argon` for LTS releases from the "argon" line, for example. In addition, the following commands support LTS arguments:153+ - `nvm install --lts` / `nvm install --lts=argon`154+ - `nvm uninstall --lts` / `nvm uninstall --lts=argon`155+ - `nvm use --lts` / `nvm use --lts=argon`156+ - `nvm exec --lts` / `nvm exec --lts=argon`157+ - `nvm run --lts` / `nvm run --lts=argon`158+ - `nvm ls-remote --lts` / `nvm ls-remote --lts=argon`159+ - `nvm version-remote --lts` / `nvm version-remote --lts=argon`160+161+Any time your local copy of `nvm` connects to https://nodejs.org, it will re-create the appropriate local aliases for all available LTS lines. These aliases (stored under `$NVM_DIR/alias/lts`), are managed by `nvm`, and you should not modify, remove, or create these files - expect your changes to be undone, and expect meddling with these files to cause bugs that will likely not be supported.162+163+### Migrating global packages while installing164 If you want to install a new version of Node.js and migrate npm packages from a previous version:165 166 ```sh167 nvm install node --reinstall-packages-from=node3 unmodified lines171 172 You can also install and migrate npm packages from specific versions of Node like this:173 174 ```sh162-nvm install v5.0 --reinstall-packages-from=4.2175+nvm install 6 --reinstall-packages-from=5176 nvm install v4.2 --reinstall-packages-from=iojs177 ```178 179+### io.js180 If you want to install [io.js](https://github.com/iojs/io.js/):181 182 ```sh183 nvm install iojs6 unmodified lines190 ```191 192 The same guidelines mentioned for migrating npm packages in Node.js are applicable to io.js.193 194+### System version of node195 If you want to use the system-installed version of node, you can use the special default alias "system":196 197 ```sh198 nvm use system199 nvm run system --version200 ```201 202+### Listing versions203 If you want to see what versions are installed:204 205 ```sh206 nvm ls25 unmodified lines232 233 NVM_NODEJS_ORG_MIRROR=https://nodejs.org/dist nvm install 4.2234 ```235 220-To use a mirror of the iojs binaries, set `$NVM_IOJS_ORG_MIRROR`:236+To use a mirror of the io.js binaries, set `$NVM_IOJS_ORG_MIRROR`:237 238 ```sh239 export NVM_IOJS_ORG_MIRROR=https://iojs.org/dist240 nvm install iojs-v1.0.3241 242 NVM_IOJS_ORG_MIRROR=https://iojs.org/dist nvm install iojs-v1.0.3243 ```244 229-`nvm use` will not, by default, create a "current" symlink. Set `$NVM_SYMLINK_CURRENT` to "true" to enable this behavior, which is sometimes useful for IDEs.245+`nvm use` will not, by default, create a "current" symlink. Set `$NVM_SYMLINK_CURRENT` to "true" to enable this behavior, which is sometimes useful for IDEs. Note that using `nvm` in multiple shell tabs with this environment variable enabled can cause race conditions.246 247 ### .nvmrc248 249 You can create a `.nvmrc` file containing version number in the project root directory (or any parent directory).2 unmodified lines252 For example, to make nvm default to the latest 5.9 release for the current directory:253 254 ```sh255 $ echo "5.9" > .nvmrc256+257+$ echo "lts/*" > .nvmrc # to default to the latest LTS version258 ```259 260 Then when you run nvm:261 35 unmodified lines297 298 nvm is released under the MIT license.299 300 283-Copyright (C) 2010-2016 Tim Caswell301+Copyright (C) 2010-2016 Tim Caswell and Jordan Harband302 303 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:304 305 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.126 unmodified lines