yarn.plugin.zsh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. if zstyle -T ':omz:plugins:yarn' global-path; then
  2. # Skip yarn call if default global bin dir exists
  3. [[ -d "$HOME/.yarn/bin" ]] && bindir="$HOME/.yarn/bin" || bindir="$(yarn global bin 2>/dev/null)"
  4. # Add yarn bin directory to $PATH if it exists and not already in $PATH
  5. [[ $? -eq 0 ]] \
  6. && [[ -d "$bindir" ]] \
  7. && (( ! ${path[(Ie)$bindir]} )) \
  8. && path+=("$bindir")
  9. unset bindir
  10. fi
  11. alias y="yarn"
  12. alias ya="yarn add"
  13. alias yad="yarn add --dev"
  14. alias yap="yarn add --peer"
  15. alias yb="yarn build"
  16. alias ycc="yarn cache clean"
  17. alias yd="yarn dev"
  18. alias yga="yarn global add"
  19. alias ygls="yarn global list"
  20. alias ygrm="yarn global remove"
  21. alias ygu="yarn global upgrade"
  22. alias yh="yarn help"
  23. alias yi="yarn init"
  24. alias yin="yarn install"
  25. alias yln="yarn lint"
  26. alias ylnf="yarn lint --fix"
  27. alias yls="yarn list"
  28. alias yout="yarn outdated"
  29. alias yp="yarn pack"
  30. alias yrm="yarn remove"
  31. alias yrun="yarn run"
  32. alias ys="yarn serve"
  33. alias yst="yarn start"
  34. alias yt="yarn test"
  35. alias ytc="yarn test --coverage"
  36. alias yuc="yarn global upgrade && yarn cache clean"
  37. alias yui="yarn upgrade-interactive"
  38. alias yuil="yarn upgrade-interactive --latest"
  39. alias yup="yarn upgrade"
  40. alias yv="yarn version"
  41. alias yw="yarn workspace"
  42. alias yws="yarn workspaces"