mirror of
https://github.com/chenasraf/dotfiles.git
synced 2026-05-17 17:28:07 +00:00
fix(fnm): use fnm lazy loader for node/npm/pnpm
This commit is contained in:
21
exports.zsh
21
exports.zsh
@@ -71,6 +71,27 @@ if [[ -f $(which fnm) ]]; then
|
||||
eval "$(command fnm env)"
|
||||
fnm "$@"
|
||||
}
|
||||
npm() {
|
||||
unset -f npm
|
||||
if [[ -z $(fnm current) ]]; then
|
||||
fnm default lts-latest
|
||||
fi
|
||||
npm "$@"
|
||||
}
|
||||
pnpm() {
|
||||
unset -f pnpm
|
||||
if [[ -z $(fnm current) ]]; then
|
||||
fnm default lts-latest
|
||||
fi
|
||||
pnpm "$@"
|
||||
}
|
||||
node() {
|
||||
unset -f node
|
||||
if [[ -z $(fnm current) ]]; then
|
||||
fnm default lts-latest
|
||||
fi
|
||||
node "$@"
|
||||
}
|
||||
fi
|
||||
|
||||
# SurrealDB
|
||||
|
||||
Reference in New Issue
Block a user