Add bun to Node setup
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user