moving to nodenv

This commit is contained in:
James Walker 2017-04-07 12:31:44 -04:00
parent b1259fc660
commit 27caabc1e8
Signed by: walkah
GPG Key ID: 3C127179D6086E93
6 changed files with 9 additions and 18 deletions

View File

@ -1,3 +1,4 @@
.ssh
.chef
.rbenv
.nodenv

View File

@ -2,6 +2,7 @@
cask_args appdir: '/Applications'
# taps
tap 'homebrew/php'
tap 'nodenv/nodenv'
cask 'java'
# brews
brew 'composer'
@ -19,7 +20,8 @@ brew 'mas'
brew 'mongodb'
brew 'mr'
brew 'mtr'
brew 'nvm'
brew 'nodenv'
brew 'nodenv-default-packages'
brew 'openssl'
brew 'php-code-sniffer'
brew 'postgresql'
@ -77,7 +79,6 @@ mas 'Noizio', id: 928871589
mas 'Pages', id: 409201541
mas 'Pocket', id: 568494494
mas 'Simplify', id: 448003584
mas 'Spark', id: 1176895641
mas 'Todoist', id: 585829637
mas 'Twitter', id: 409789998
mas 'Xcode', id: 497799835

View File

@ -0,0 +1,2 @@
coffeescript
yarn

View File

@ -1,9 +1 @@
# oh-my-zsh complains without a .zsh file in here
autoload -U add-zsh-hook
load-nvmrc() {
if [[ -f .nvmrc && -r .nvmrc ]]; then
nvm use
fi
}
add-zsh-hook chpwd load-nvmrc

View File

@ -5,7 +5,7 @@ local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%{$fg[$HCOLOR]%}%m%{$reset_color%}:%c $(git_prompt_info)%{$fg[red]%}%(!.#.»)%{$reset_color%} '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
RPS1='%{$fg[cyan]%}(%{$fg[red]%}$(ruby_prompt_info) %{$fg[green]%}$(nvm current) %{$fg[blue]%}$(pyenv_prompt_info)%{$fg[cyan]%}) %{$reset_color%}${return_code}'
RPS1='%{$fg[cyan]%}(%{$fg[red]%}$(ruby_prompt_info) %{$fg[green]%}$(nodenv version-name) %{$fg[blue]%}$(pyenv_prompt_info)%{$fg[cyan]%}) %{$reset_color%}${return_code}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}±%{$fg[yellow]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "

View File

@ -26,7 +26,8 @@ plugins=($plugins ruby gem rbenv rails bundler heroku)
export RBENV_ROOT=$HOME/.rbenv
# node
plugins=($plugins nvm npm yarn)
plugins=($plugins npm yarn)
eval "$(nodenv init -)"
# python
plugins=($plugins pyenv pip)
@ -46,12 +47,6 @@ esac
UNBUNDLED_COMMANDS=(knife)
# nvm from homebrew
if [ -f /usr/local/opt/nvm/nvm.sh ]; then
export NVM_DIR=$HOME/.nvm
source /usr/local/opt/nvm/nvm.sh
fi
# OH MY ZSH!
source $ZSH/oh-my-zsh.sh