| 
									
										
										
										
											2016-07-15 17:13:48 -07:00
										 |  |  | #!/usr/bin/env bash
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | set -e -o pipefail | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | cd `dirname $0`/.. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [[ "$(node --version)" < "v5" ]]; then | 
					
						
							|  |  |  |     echo "ERROR: bad version of node detected. If you have nvm installed, type:" | 
					
						
							|  |  |  |     echo "  nvm use" | 
					
						
							|  |  |  |     echo "Aborting installation." | 
					
						
							|  |  |  |     exit 1; | 
					
						
							|  |  |  | else | 
					
						
							|  |  |  |     echo "Node version: $(node --version)" | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | echo "Installing main packages ..." | 
					
						
							|  |  |  | npm install --no-optional | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-07-18 15:59:42 -07:00
										 |  |  | if [ -z "$TRAVIS" ]; then | 
					
						
							| 
									
										
										
										
											2016-07-15 17:13:48 -07:00
										 |  |  |     echo "Rebuilding node-sass, just in case ..." | 
					
						
							|  |  |  |     npm rebuild node-sass; | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | echo "Installing packages for examples ..." | 
					
						
							|  |  |  | source ./scripts/examples-install.sh | 
					
						
							|  |  |  | set +x | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | echo "Installation done" |