Skip to content

Commit

Permalink
Revise docs, words and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgebucaran committed Jun 22, 2022
1 parent 5099f2f commit a15edec
Showing 1 changed file with 19 additions and 22 deletions.
41 changes: 19 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,18 @@ nvm install lts

Install an older LTS release by codename.

> Installs `8.16.2`, the latest release of the Carbon LTS line.
```console
nvm install carbon
```

> Installs `8.16.2`, the latest release of the Carbon LTS line.
Or install a specific version of Node.

```console
nvm install v12.9.1
```

> Supports full or partial version numbers, starting with an optional "v".
The `nvm install` command activates the specified Node version only in the current environment. If you want to set the default version for new shells use:

```fish
set --universal nvm_default_version v12.9.1
```console
nvm install v15.3.0
```

Activate a version you've already installed.
Expand All @@ -66,21 +60,21 @@ List which versions you have installed (includes your system-installed Node if t
$ nvm list
system
v8.17.0 lts/carbon
v12.9.1
v15.3.0
▶ v14.15.1 lts/fermium
v15.3.0 latest
v18.4.0 latest
```

Or list all the Node versions available to install.
Or list all the Node versions that can be installed.

```console
nvm list-remote
```

Want to uninstall a Node version?
Want to uninstall a version?

```console
nvm uninstall v12.9.1
nvm uninstall v15.3.0
```

## `.nvmrc`
Expand All @@ -99,24 +93,27 @@ nvm install

## `$nvm_mirror`

If you would like to use a different Node.js mirror that has the same layout as the default at https://nodejs.org/dist, you can set `$nvm_mirror`. A typical example is users from China using:
Use a mirror of the Node binaries. Default: https://nodejs.org/dist.

```console
set --universal nvm_mirror https://npm.taobao.org/mirrors/node
## `$nvm_default_version`

The `nvm install` command activates the specified Node version only in the current environment. If you want to set the default version for new shells use:

```fish
set --universal nvm_default_version v18.4.0
```

## `$nvm_default_packages`

You can set `$nvm_default_packages` to have nvm.fish install a set of global node modules after installing a new Node version. For example, to install `yarn` and `np` globally after installing the latest node:
If you have a list of default packages you want installed every time you install a new Node version use:

```console
```fish
set --universal nvm_default_packages yarn np
nvm install latest
```

## Acknowledgments

nvm.fish started out in 2016 by [@jorgebucaran](https://github.com/jorgebucaran) as Fish's premier choice to Node.js version management. A heartfelt thank you to [@creationx](https://github.com/creationix) and [@ljharb](https://github.com/ljharb) for creating the one true [nvm.sh](https://github.com/nvm-sh/nvm) that served as the inspiration for this project. If you are looking for a way to use the original nvm right from Fish, check out [@FabioAntunes/fish-nvm](https://github.com/FabioAntunes/fish-nvm) or [@derekstavis/plugin-nvm](https://github.com/derekstavis/plugin-nvm). Thank you to all our contributors! <3
nvm.fish started out in 2016 by [@jorgebucaran](https://github.com/jorgebucaran) as Fish's premier choice to Node.js version management. All credit to [@creationx](https://github.com/creationix) and [@ljharb](https://github.com/ljharb) for creating the one true [nvm.sh](https://github.com/nvm-sh/nvm) that served as the inspiration for this project. If you are looking for a way to use the original nvm right from Fish, check out [@FabioAntunes/fish-nvm](https://github.com/FabioAntunes/fish-nvm) or [@derekstavis/plugin-nvm](https://github.com/derekstavis/plugin-nvm). Thank you to all our contributors! <3

## License

Expand Down

0 comments on commit a15edec

Please sign in to comment.