diff options
author | 2025-02-13 14:13:49 +0530 | |
---|---|---|
committer | 2025-02-13 14:13:49 +0530 | |
commit | 8a2e1006b3b272126332aa064f3ad95387129544 (patch) | |
tree | 944c80ac612a65980d94a54ba11b6c7102037ecf /.config/zsh/oh-my-zsh/plugins/yarn/yarn.plugin.zsh | |
parent | dcbb16d8b08ff5956abef5e6478b59df2e93ad35 (diff) | |
download | dotfiles-master.tar.gz dotfiles-master.tar.bz2 dotfiles-master.zip |
Diffstat (limited to '.config/zsh/oh-my-zsh/plugins/yarn/yarn.plugin.zsh')
-rw-r--r-- | .config/zsh/oh-my-zsh/plugins/yarn/yarn.plugin.zsh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/.config/zsh/oh-my-zsh/plugins/yarn/yarn.plugin.zsh b/.config/zsh/oh-my-zsh/plugins/yarn/yarn.plugin.zsh new file mode 100644 index 0000000..bcb8661 --- /dev/null +++ b/.config/zsh/oh-my-zsh/plugins/yarn/yarn.plugin.zsh @@ -0,0 +1,44 @@ +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" +alias ya="yarn add" +alias yad="yarn add --dev" +alias yap="yarn add --peer" +alias yb="yarn build" +alias ycc="yarn cache clean" +alias yd="yarn dev" +alias yga="yarn global add" +alias ygls="yarn global list" +alias ygrm="yarn global remove" +alias ygu="yarn global upgrade" +alias yh="yarn help" +alias yi="yarn init" +alias yin="yarn install" +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" +alias yui="yarn upgrade-interactive" +alias yuil="yarn upgrade-interactive --latest" +alias yup="yarn upgrade" +alias yv="yarn version" +alias yw="yarn workspace" +alias yws="yarn workspaces" |