Compare commits

...

1 Commits

Author SHA1 Message Date
c9d0284c91 dfm: Install command improvements 2023-04-18 07:44:01 +03:00
2 changed files with 14 additions and 6 deletions

View File

@@ -93,9 +93,9 @@ function section_install
;; ;;
nvm) nvm)
curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION_NVM/install.sh" | bash \ curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION_NVM/install.sh" | bash \
&& nvm install --lts --latest-npm --default \ && nvm install --lts --latest-npm --default
&& git checkout "$HOME/.zshrc" \ git checkout "$DOTFILES/base/zshrc"
&& msg_yay "nvm installed!" msg_yay "nvm installed!"
;; ;;
npm) npm)
bash "$DOTFILES/scripts/install-npm-packages.sh" \ bash "$DOTFILES/scripts/install-npm-packages.sh" \

View File

@@ -15,7 +15,6 @@ have npm && {
"prettier" "prettier"
"@bchatard/alfred-jetbrains" "@bchatard/alfred-jetbrains"
"@johnnymorganz/stylua-bin" "@johnnymorganz/stylua-bin"
"js-debug"
"stylelint-lsp" "stylelint-lsp"
"blade-formatter" "blade-formatter"
"@loopback/cli" "@loopback/cli"
@@ -29,8 +28,17 @@ have npm && {
# Skip comments # Skip comments
if [[ ${pkg:0:1} == "#" ]]; then continue; fi if [[ ${pkg:0:1} == "#" ]]; then continue; fi
msg_run "Installing npm package:" "$pkg" if [[ $(npm ls -g -p "$pkg") != "" ]]; then
npm install -g --no-fund --no-progress --no-timing "$pkg" msg_run_done "$pkg" "already installed"
else
msg_run "Installing npm package:" "$pkg"
npm install -g --no-fund --no-progress --no-timing "$pkg"
fi
echo "" echo ""
done done
msg_run "Upgrading all global packages"
npm -g --no-progress --no-timing --no-fund outdated
npm -g --no-timing --no-fund upgrade
} || msg_err "npm could not be found." } || msg_err "npm could not be found."