mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-25 04:29:29 +01:00
{bash,zsh}rc: fix pnpm aliases for corepack
This commit is contained in:
parent
823545ed39
commit
fc98187a1c
16
rc/bashrc
16
rc/bashrc
@ -577,15 +577,19 @@ alias mkdir="\mkdir --verbose"
|
||||
alias chattr="\chattr -V"
|
||||
alias chmod="\chmod --verbose"
|
||||
|
||||
# pnpm does less duplicating around
|
||||
if hash pnpm 2> /dev/null; then
|
||||
alias npm=pnpm
|
||||
alias npmx=pnpx
|
||||
alias npx=pnpx
|
||||
alias pnpmx=pnpx
|
||||
# https://github.com/nodejs/corepack/blob/v0.28.2/README.md#corepack-enable--name
|
||||
if hash corepack 2> /dev/null; then
|
||||
alias yarn="corepack yarn"
|
||||
alias yarnpkg="corepack yarnpkg"
|
||||
alias pnpm="corepack pnpm"
|
||||
alias pnpx="corepack pnpx"
|
||||
alias npm="corepack npm"
|
||||
alias npx="corepack npx"
|
||||
if ! hash prettier 2> /dev/null; then
|
||||
alias prettier="pnpm exec prettier --cache --ignore-unknown"
|
||||
fi
|
||||
else
|
||||
echo "WARNING! corepack is not installed."
|
||||
fi
|
||||
|
||||
# github-pages etc.
|
||||
|
16
rc/zshrc
16
rc/zshrc
@ -567,15 +567,19 @@ alias mkdir="\mkdir --verbose"
|
||||
alias chattr="\chattr -V"
|
||||
alias chmod="\chmod --verbose"
|
||||
|
||||
# pnpm does less duplicating around
|
||||
if hash pnpm 2>/dev/null; then
|
||||
alias npm=pnpm
|
||||
alias npmx=pnpx
|
||||
alias npx=pnpx
|
||||
alias pnpmx=pnpx
|
||||
# https://github.com/nodejs/corepack/blob/v0.28.2/README.md#corepack-enable--name
|
||||
if hash corepack 2>/dev/null; then
|
||||
alias yarn="corepack yarn"
|
||||
alias yarnpkg="corepack yarnpkg"
|
||||
alias pnpm="corepack pnpm"
|
||||
alias pnpx="corepack pnpx"
|
||||
alias npm="corepack npm"
|
||||
alias npx="corepack npx"
|
||||
if ! hash prettier 2>/dev/null; then
|
||||
alias prettier="pnpm exec prettier --cache --ignore-unknown"
|
||||
fi
|
||||
else
|
||||
echo "WARNING! corepack is not installed."
|
||||
fi
|
||||
|
||||
# github-pages etc.
|
||||
|
Loading…
Reference in New Issue
Block a user