Skip to content

Commit

Permalink
Change ui
Browse files Browse the repository at this point in the history
  • Loading branch information
grigorii-horos committed Aug 17, 2023
1 parent 66d7c0c commit 8b09ea4
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions pr-node.plugin.zsh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env zsh

: ${PR_NODE_GULPFILE:=''}
: ${PR_NODE_WEBPACK:=''}
: ${PR_NODE_SYMBOL:=''}
: ${PR_NODE_SYMBOL:='󰎙'}

typeset -g pr_node

Expand All @@ -11,20 +9,14 @@ if (( $+commands[node] )); then
pr_node=''

if is-recursive-exist package.json; then
pr_node=' '

if is-recursive-exist gulpfile.js || is-recursive-exist gulpfile.babel.js; then
pr_node+="%{${c[red]}${c[bold]}${c[dim]}%}${NODE_GULPFILE}%{${c[reset]}%} "
fi

if is-recursive-exist webpack.config.js; then
pr_node+="%{${c[blue]}${c[bold]}${c[dim]}%}ﰩ%{${c[reset]}%} "
fi
pr_node=" %{${c[base3]}${c[bold]}%}(%{${c[reset]}%}"

nodev=$(node -v)
nodev=${nodev#'v'}

pr_node+="%{${c[springgreen]}${c[bold]}%}${PR_NODE_SYMBOL}%{${c[reset]}%} %{${c[blue]}${c[bold]}%}$nodev%{${c[reset]}%}"
pr_node+="%{${c[green]}${c[bold]}%}${PR_NODE_SYMBOL}%{${c[reset]}%} %{${c[green]}${c[bold]}%}$nodev%{${c[reset]}%}"

pr_node+="%{${c[base3]}${c[bold]}%})%{${c[reset]}%}"
fi
}

Expand Down

0 comments on commit 8b09ea4

Please sign in to comment.