mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-26 11:14:08 +00:00
dfm: Install command improvements
This commit is contained in:
@@ -93,9 +93,9 @@ function section_install
|
||||
;;
|
||||
nvm)
|
||||
curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION_NVM/install.sh" | bash \
|
||||
&& nvm install --lts --latest-npm --default \
|
||||
&& git checkout "$HOME/.zshrc" \
|
||||
&& msg_yay "nvm installed!"
|
||||
&& nvm install --lts --latest-npm --default
|
||||
git checkout "$DOTFILES/base/zshrc"
|
||||
msg_yay "nvm installed!"
|
||||
;;
|
||||
npm)
|
||||
bash "$DOTFILES/scripts/install-npm-packages.sh" \
|
||||
|
||||
@@ -15,7 +15,6 @@ have npm && {
|
||||
"prettier"
|
||||
"@bchatard/alfred-jetbrains"
|
||||
"@johnnymorganz/stylua-bin"
|
||||
"js-debug"
|
||||
"stylelint-lsp"
|
||||
"blade-formatter"
|
||||
"@loopback/cli"
|
||||
@@ -29,8 +28,17 @@ have npm && {
|
||||
# Skip comments
|
||||
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
|
||||
|
||||
msg_run "Installing npm package:" "$pkg"
|
||||
npm install -g --no-fund --no-progress --no-timing "$pkg"
|
||||
if [[ $(npm ls -g -p "$pkg") != "" ]]; then
|
||||
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 ""
|
||||
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."
|
||||
|
||||
Reference in New Issue
Block a user