From 12b7e7746681460779888e592aee8a226e45f429 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 26 Jul 2017 14:40:46 +0200 Subject: [PATCH] Remove node_modules/.bin from PATH; add new alias: npmbin --- dev/+js/aliases.zsh | 2 ++ dev/+js/env.zsh | 4 ---- 2 files changed, 2 insertions(+), 4 deletions(-) create mode 100644 dev/+js/aliases.zsh diff --git a/dev/+js/aliases.zsh b/dev/+js/aliases.zsh new file mode 100644 index 00000000..e85fabcd --- /dev/null +++ b/dev/+js/aliases.zsh @@ -0,0 +1,2 @@ +# Run locally installed bin-script, e.g. npmbin coffee file.coffee +alias npmbin='PATH=$(npm bin):$PATH' diff --git a/dev/+js/env.zsh b/dev/+js/env.zsh index 8347318c..d51a6c73 100644 --- a/dev/+js/env.zsh +++ b/dev/+js/env.zsh @@ -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)