Add bun to Node setup

This commit is contained in:
MangoPig
2026-06-05 04:15:34 +01:00
parent 3299e2e949
commit a596a2d527
4 changed files with 25 additions and 3 deletions

View File

@@ -233,7 +233,7 @@ build_prompt() {
[ -z "$python_version" ] || tool_versions+=("%F{magenta} ${python_version}%f")
fi
if project_has_pattern '**/package.json' '**/.nvmrc' '**/pnpm-workspace.yaml' '**/yarn.lock' '**/package-lock.json'; then
if project_has_pattern '**/package.json' '**/.nvmrc' '**/pnpm-workspace.yaml' '**/yarn.lock' '**/package-lock.json' '**/bun.lock' '**/bun.lockb'; then
node_version="$(get_command_version node)"
[ -z "$node_version" ] || tool_versions+=("%F{green} ${node_version}%f")
fi

View File

@@ -219,6 +219,13 @@ bindkey '^[OA' history-substring-search-up
bindkey '^[[B' history-substring-search-down
bindkey '^[OB' history-substring-search-down
# bun
export BUN_INSTALL="$PROG_DIR/node/bun"
case ":$PATH:" in
*":$BUN_INSTALL/bin:"*) ;;
*) export PATH="$BUN_INSTALL/bin:$PATH" ;;
esac
# pnpm
export PNPM_HOME="$PROG_DIR/node/pnpm"
case ":$PATH:" in