make docs more readable
This commit is contained in:
parent
748c51a687
commit
82e6ace060
59
README.md
59
README.md
|
@ -35,6 +35,39 @@ wget -nv https://bit.ly/node-installer -O - ./node-installer.sh; bash ./node-ins
|
||||||
|
|
||||||
### Choosing a specific version
|
### Choosing a specific version
|
||||||
|
|
||||||
|
**Latest**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export NODEJS_VER=""
|
||||||
|
```
|
||||||
|
|
||||||
|
**Exact**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export NODEJS_VER="v10.2.1"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Latest of vX.Y.Z**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export NODEJS_VER="v8.1"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Latest of vX.YY.Z**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# latest of v8.11.x
|
||||||
|
export NODEJS_VER="v8.11"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Latest of vX.Y**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
export NODEJS_VER="v10"
|
||||||
|
```
|
||||||
|
|
||||||
|
Fun FYI, here's how the latest version is determined:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
NODEJS_VER=$(curl -fsSL https://nodejs.org/dist/index.tab | tail -n +2 | cut -f 1 | head -1 )
|
NODEJS_VER=$(curl -fsSL https://nodejs.org/dist/index.tab | tail -n +2 | cut -f 1 | head -1 )
|
||||||
echo "The current node.js version is $NODEJS_VER"
|
echo "The current node.js version is $NODEJS_VER"
|
||||||
|
@ -46,25 +79,6 @@ NODEJS_VER=$(curl -fsSL https://nodejs.org/dist/index.tab | tail -n +2 | cut -f
|
||||||
echo "Latest node.js $BASE_VER is $NODEJS_VER"
|
echo "Latest node.js $BASE_VER is $NODEJS_VER"
|
||||||
```
|
```
|
||||||
|
|
||||||
To install the latest of a specific version rather than defaulting to latest
|
|
||||||
|
|
||||||
```bash
|
|
||||||
### latest version
|
|
||||||
export NODEJS_VER=""
|
|
||||||
|
|
||||||
# exact version
|
|
||||||
export NODEJS_VER="v10.2.1"
|
|
||||||
|
|
||||||
# latest of v8.1.x
|
|
||||||
export NODEJS_VER="v8.1"
|
|
||||||
|
|
||||||
# latest of v8.11.x
|
|
||||||
export NODEJS_VER="v8.11"
|
|
||||||
|
|
||||||
# latest of v10.x
|
|
||||||
export NODEJS_VER="v10"
|
|
||||||
```
|
|
||||||
|
|
||||||
### Choosing an install location
|
### Choosing an install location
|
||||||
|
|
||||||
Just set BOTH `NODE_PATH` and `NPM_CONFIG_PREFIX`.
|
Just set BOTH `NODE_PATH` and `NPM_CONFIG_PREFIX`.
|
||||||
|
@ -74,10 +88,15 @@ The install path will be the preceding `lib/node_modules`
|
||||||
```bash
|
```bash
|
||||||
export NPM_CONFIG_PREFIX=/tmp/user/local
|
export NPM_CONFIG_PREFIX=/tmp/user/local
|
||||||
export NODE_PATH=/tmp/user/local/lib/node_modules
|
export NODE_PATH=/tmp/user/local/lib/node_modules
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
curl -fsSL https://bit.ly/node-installer -o ./node-installer.sh; bash ./node-installer.sh --dev-deps
|
curl -fsSL https://bit.ly/node-installer -o ./node-installer.sh; bash ./node-installer.sh --dev-deps
|
||||||
|
```
|
||||||
|
|
||||||
# If you want to add the install location to your PATH
|
If you want to add the install location to your `PATH`:
|
||||||
|
|
||||||
|
```bash
|
||||||
PATH=$PATH:/tmp/user/local/bin
|
PATH=$PATH:/tmp/user/local/bin
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue