forked from coolaj86/node-installer.sh
		
	show selecting version in docs
This commit is contained in:
		
							parent
							
								
									0c7d0a7da6
								
							
						
					
					
						commit
						748c51a687
					
				
							
								
								
									
										30
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								README.md
									
									
									
									
									
								
							@ -36,13 +36,33 @@ wget -nv https://bit.ly/node-installer -O - ./node-installer.sh; bash ./node-ins
 | 
			
		||||
### Choosing a specific version
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
echo "Current node.js version is $(curl -fsSL https://nodejs.org/dist/index.tab | head -2 | tail -1 | cut -f 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"
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
```bash
 | 
			
		||||
# To install a specific version rather than defaulting to latest
 | 
			
		||||
# latest version at time of writing are v8.11.1 and v10.1.0
 | 
			
		||||
export NODEJS_VER="v10.1.0"
 | 
			
		||||
BASE_VER="v10\\."
 | 
			
		||||
NODEJS_VER=$(curl -fsSL https://nodejs.org/dist/index.tab | tail -n +2 | cut -f 1 | grep $BASE_VER | head -1 )
 | 
			
		||||
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
 | 
			
		||||
@ -101,7 +121,7 @@ wget -nv https://bit.ly/node-installer -O /tmp/node-installer.sh; bash /tmp/node
 | 
			
		||||
 | 
			
		||||
### Other things you should know
 | 
			
		||||
 | 
			
		||||
This is what gets installed:
 | 
			
		||||
This is what gets installed with the dev dependencies:
 | 
			
		||||
 | 
			
		||||
* rsync
 | 
			
		||||
* curl
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user