Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: delete load lazy nvm #94

Merged
merged 1 commit into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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