ohmyzsh/plugins/yarn/yarn.plugin.zsh

47 lines
1.3 KiB
Bash
Raw Normal View History

if zstyle -T ':omz:plugins:yarn' global-path; then
# Skip yarn call if default global bin dir exists
[[ -d "$HOME/.yarn/bin" ]] && bindir="$HOME/.yarn/bin" || bindir="$(yarn global bin 2>/dev/null)"
# Add yarn bin directory to $PATH if it exists and not already in $PATH
[[ $? -eq 0 ]] \
&& [[ -d "$bindir" ]] \
&& (( ! ${path[(Ie)$bindir]} )) \
&& path+=("$bindir")
unset bindir
fi
alias y="yarn"
2017-11-04 10:41:14 -07:00
alias ya="yarn add"
alias yad="yarn add --dev"
alias yap="yarn add --peer"
alias yb="yarn build"
2017-11-04 10:41:14 -07:00
alias ycc="yarn cache clean"
2019-10-01 13:24:00 -07:00
alias yd="yarn dev"
2022-12-05 06:18:18 -07:00
alias yf="yarn format"
alias yga="yarn global add"
alias ygls="yarn global list"
alias ygrm="yarn global remove"
alias ygu="yarn global upgrade"
2017-11-04 10:41:14 -07:00
alias yh="yarn help"
alias yi="yarn init"
alias yin="yarn install"
2019-12-19 19:35:50 -07:00
alias yln="yarn lint"
alias ylnf="yarn lint --fix"
alias yls="yarn list"
alias yout="yarn outdated"
alias yp="yarn pack"
alias yrm="yarn remove"
alias yrun="yarn run"
alias ys="yarn serve"
alias yst="yarn start"
alias yt="yarn test"
alias ytc="yarn test --coverage"
alias yuc="yarn global upgrade && yarn cache clean"
2017-11-04 10:41:14 -07:00
alias yui="yarn upgrade-interactive"
alias yuil="yarn upgrade-interactive --latest"
alias yup="yarn upgrade"
2019-10-09 06:17:05 -07:00
alias yv="yarn version"
2019-01-02 13:12:13 -07:00
alias yw="yarn workspace"
alias yws="yarn workspaces"
alias yy="yarn why"