From: AJ ONeal Date: Mon, 22 Mar 2021 21:26:23 +0000 (+0000) Subject: vim-prettier: install node if missing X-Git-Url: https://git.josue.xyz/?a=commitdiff_plain;h=1bc08d39df412c50f18cfbd67fb05ba360525fdc;hp=d24c769a614c2f1c2e6b2f186522864619478d47;p=webi-installers%2F.git vim-prettier: install node if missing --- diff --git a/vim-prettier/install.sh b/vim-prettier/install.sh index 50387ab..eebd1fa 100644 --- a/vim-prettier/install.sh +++ b/vim-prettier/install.sh @@ -8,6 +8,10 @@ function __init_vim_prettier() { rm -rf "$HOME/.vim/pack/plugins/start/vim-prettier" git clone --depth=1 https://github.com/prettier/vim-prettier.git "$HOME/.vim/pack/plugins/start/vim-prettier" + if [ -z "$(command -v node)" ]; then + export PATH="$HOME/.local/opt/node/bin:$HOME/.local/bin:${PATH}" + webi node + fi npm install -g prettier@2 if [ ! -f "$HOME/.vimrc" ]; then