mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-08-19 03:56:16 +00:00
vim-prettier: install node if missing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user