From 1bc08d39df412c50f18cfbd67fb05ba360525fdc Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Mon, 22 Mar 2021 21:26:23 +0000 Subject: [PATCH] vim-prettier: install node if missing --- vim-prettier/install.sh | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.25.1