make ruby/yarn configuration optional
This commit is contained in:
		
							parent
							
								
									a9654b9d75
								
							
						
					
					
						commit
						22c9f6240e
					
				| 
						 | 
				
			
			@ -53,12 +53,6 @@ alias dokku='ssh -t dokku@dokku.isnet.uk'
 | 
			
		|||
 | 
			
		||||
alias pacman='~/.src/archnews/archnews_wrap'
 | 
			
		||||
 | 
			
		||||
alias npm_real=$(command -v npm)
 | 
			
		||||
function npm {
 | 
			
		||||
  echo "Please use Yarn instead!!"
 | 
			
		||||
  echo "  If you must use npm use: 'npm_real'"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# lf gets confused by TERMINFO env var when running in tmux
 | 
			
		||||
# https://github.com/gokcehan/lf/issues/138#issuecomment-464477665
 | 
			
		||||
if [ -n "$TERMINFO" ] ; then
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										17
									
								
								profile
								
								
								
								
							
							
						
						
									
										17
									
								
								profile
								
								
								
								
							| 
						 | 
				
			
			@ -2,8 +2,21 @@ export SHELL_CONFIG="$SHELL_CONFIG:.profile"
 | 
			
		|||
export EDITOR=/usr/bin/vim
 | 
			
		||||
export BROWSER=/usr/bin/qutebrowser
 | 
			
		||||
 | 
			
		||||
ruby_path=$(ruby -r rubygems -e "puts Gem.user_dir")/bin
 | 
			
		||||
yarn_path=$(yarn global bin)
 | 
			
		||||
if command -v ruby ; then
 | 
			
		||||
	ruby_path=$(ruby -r rubygems -e "puts Gem.user_dir")/bin
 | 
			
		||||
	export PATH="$ruby_path:$PATH"
 | 
			
		||||
fi &> /dev/null
 | 
			
		||||
 | 
			
		||||
if command -v yarn ; then
 | 
			
		||||
	yarn_path=$(yarn global bin)
 | 
			
		||||
	export PATH="$yarn_path:$PATH"
 | 
			
		||||
 | 
			
		||||
	alias npm_real=$(command -v npm)
 | 
			
		||||
	function npm {
 | 
			
		||||
		echo "Please use Yarn instead!!"
 | 
			
		||||
		echo "  If you must use npm use: 'npm_real'"
 | 
			
		||||
	}
 | 
			
		||||
fi &> /dev/null
 | 
			
		||||
 | 
			
		||||
export PATH="$HOME/.bin:$HOME/.local/bin:$yarn_path:$ruby_path:$PATH"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue