Remove node_modules/.bin from PATH; add new alias: npmbin

This commit is contained in:
Henrik Lissner 2017-07-26 14:40:46 +02:00
parent cdaeab4471
commit 12b7e77466
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 2 additions and 4 deletions

2
dev/+js/aliases.zsh Normal file
View file

@ -0,0 +1,2 @@
# Run locally installed bin-script, e.g. npmbin coffee file.coffee
alias npmbin='PATH=$(npm bin):$PATH'

View file

@ -1,4 +1,3 @@
export NVM_DIR="$HOME/.nvm"
# [[ -s "$NVM_DIR/nvm.sh" ]] && . "$NVM_DIR/nvm.sh"
@ -8,6 +7,3 @@ export NVM_DIR="$HOME/.nvm"
# NOTE This assumes you use the `node` nvm alias, e.g. `nvm install node`
npmpaths=( $HOME/.nvm/versions/node/*/bin(On) )
path=("${npmpaths[1]}" $path)
# Local binaries take priority
path=(./node_modules/.bin $path)