Remove node_modules/.bin from PATH; add new alias: npmbin
This commit is contained in:
parent
cdaeab4471
commit
12b7e77466
2
dev/+js/aliases.zsh
Normal file
2
dev/+js/aliases.zsh
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Run locally installed bin-script, e.g. npmbin coffee file.coffee
|
||||
alias npmbin='PATH=$(npm bin):$PATH'
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue