Skip to content

Commit

Permalink
fix: delete load function lazy nvm (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
luismayta committed Nov 26, 2023
1 parent f5c609f commit a8ec4a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 47 deletions.
6 changes: 2 additions & 4 deletions config/base.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ export NVM_DIR="${HOME}/.nvm"
export NVM_MESSAGE_BREW="Please install brew or use antidote bundle hadenlabs/zsh-core"
export NVM_PACKAGE_NAME=nvm
export NVM_VERSIONS=(
14.15.5
14.16.1
21.1.0
18.18.2
)
export NVM_VERSION=0.39.5
export NVM_VERSION_GLOBAL=21.1.0
export NVM_VERSION_GLOBAL=18.18.2
export NVM_PACKAGES=(
lambda-pure-prompt
pure-prompt prettier
Expand Down
43 changes: 0 additions & 43 deletions internal/base.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,6 @@ function nvm::internal::nvm::install {

function nvm::internal::nvm::load {
[ -e "${YARN_PATH}/bin" ] && export PATH="${PATH}:${YARN_PATH}/bin"
# Lazy load
# http://broken-by.me/lazy-load-nvm/
nvm() {
unset -f nvm
# shellcheck source=/dev/null
export NVM_DIR=~/.nvm
# shellcheck source=/dev/null
[ -s "${NVM_DIR}/nvm.sh" ] && . "${NVM_DIR}/nvm.sh" # This loads nvm
nvm "${@}"
}

node() {
unset -f node
# shellcheck source=/dev/null
export NVM_DIR=~/.nvm
# shellcheck source=/dev/null
[ -s "${NVM_DIR}/nvm.sh" ] && . "${NVM_DIR}/nvm.sh" # This loads nvm
node "${@}"
}

npm() {
unset -f npm
export NVM_DIR=~/.nvm
# shellcheck source=/dev/null
[ -s "${NVM_DIR}/nvm.sh" ] && . "${NVM_DIR}/nvm.sh" # This loads nvm
npm "${@}"
}

yarn() {
unset -f yarn
export NVM_DIR=~/.nvm
# shellcheck source=/dev/null
[ -s "${NVM_DIR}/nvm.sh" ] && . "${NVM_DIR}/nvm.sh" # This loads nvm
yarn "${@}"
}

now() {
unset -f now
export NVM_DIR=~/.nvm
# shellcheck source=/dev/null
[ -s "${NVM_DIR}/nvm.sh" ] && . "${NVM_DIR}/nvm.sh" # This loads nvm
now "${@}"
}
}

function nvm::internal::packages::install {
Expand Down

0 comments on commit a8ec4a1

Please sign in to comment.