Skip to content

Commit 1f322e9

Browse files
authored
Merge pull request #16 from nodenv/readme-update
Update docs with auto-major/auto-pre support
2 parents 2c210b6 + 1fcea12 commit 1f322e9

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,43 @@
44

55
Invoke `nodenv alias <name> <version>` to make a symbolic link from `<name>` to
66
`<version>` in the [nodenv][] versions directory, effectively creating an
7-
alias. The cool part is that if you pass in a point release as the name, you
8-
can give `--auto` to link to the latest installed patch level. For example,
9-
`nodenv alias 0.10 --auto` will automatically create an alias from `0.10` to
10-
`0.10.36` (or whatever the most recent version you have installed is).
7+
alias. The cool part is that if you pass in a major or major.minor release as the name, you
8+
can give `--auto` to link to the latest installed minor or patch level (respectively). For example,
9+
`nodenv alias 4.4 --auto` will automatically create an alias from `4.4` to
10+
`4.4.7` (or to whatever is the most recent version you have installed). Similarly,
11+
`nodenv alias 6 --auto` will automatically create an alias from `6` to
12+
`6.10.3` (or to whatever is the most recent version you have installed).
1113

1214
Plus, if you're using [node-build][], `nodenv install major.minor.patch`
13-
automatically invokes `nodenv alias major.minor --auto`, so you'll always have
14-
up to date aliases for point releases.
15+
automatically invokes `nodenv alias major --auto` and
16+
`nodenv alias major.minor --auto`, so you'll always have
17+
up to date aliases.
1518

1619
## Installation
1720

1821
git clone https://github.com/nodenv/nodenv-aliases.git $(nodenv root)/plugins/nodenv-aliases
1922

2023
## Usage
2124

22-
Create a `major.minor` alias for each installed minor release:
25+
Create a `major` and `major.minor` alias for each installed major and minor release:
2326

2427
nodenv alias --auto
2528

29+
Create a `major` alias for the highest major release of, say 6:
30+
31+
nodenv alias 6 --auto
32+
2633
Create a `major.minor` alias for the highest minor release of, say 0.8:
2734

2835
nodenv alias 0.8 --auto
2936

37+
Create a `major.minor.patch-pre` alias for the highest prerelease of, say 8:
38+
39+
nodenv alias 8.0.0-rc --auto
40+
3041
Create a named alias for a specific release:
3142

32-
nodenv alias my-favorite-node 0.10.36
43+
nodenv alias boron 6
3344

3445
Remove an alias:
3546

0 commit comments

Comments
 (0)