direnv: Set up NVM helper
This commit is contained in:
parent
83367540bc
commit
8aebf3da77
2 changed files with 12 additions and 0 deletions
|
|
@ -57,3 +57,13 @@ read_version_file()
|
|||
watch_file "${file}"
|
||||
ruby -e "puts ARGF.readline" 2> /dev/null "${file}"
|
||||
}
|
||||
|
||||
# From https://github.com/direnv/direnv/wiki/Node#using-nvm
|
||||
use_nvm() {
|
||||
local node_version=$1
|
||||
|
||||
nvm_sh="${NVM_DIR}/nvm.sh"
|
||||
source $nvm_sh
|
||||
nvm install $node_version
|
||||
nvm use $node_version
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,3 +21,5 @@ export LOCAL_SESSION
|
|||
export SHELL=$(which zsh)
|
||||
|
||||
export FZF_DEFAULT_COMMAND='fd'
|
||||
|
||||
export NVM_DIR="${HOME}/.nvm"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue