yarn.plugin.zsh 1.2 KB

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