1
mirror of https://github.com/jakejarvis/dotfiles.git synced 2025-04-26 03:45:21 -04:00
dotfiles/npm/install_globals.sh

67 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# fetch and install Volta (better nvm)
if ! command -v volta &> /dev/null
then
# curl https://get.volta.sh | bash -s -- --skip-setup
brew install volta
fi
volta install node@latest # remove when LTS officially supports arm64
volta install npm@8
volta install yarn@1
volta fetch node@lts # not native on M1 but good to have
volta list node
volta list npm
volta list yarn
# npm ls --global --parseable --depth=0 | awk '{gsub(/\/.*\//,"",$1); print}' | sort -u
packages=(
@babel/cli
@babel/core
@lhci/cli
@vercel/ncc
autoprefixer
browserify
cross-env
cross-env-shell
dtslint
dts-gen
esbuild
eslint
express
express-generator
firebase-tools
gzip-size-cli
json-server
netlify-cli
new-component
nodemon
npm-check-updates
npm-name-cli
pm2
postcss
postcss-cli
prettier
release-it
rollup
stylelint
superstatic
svgo
terser
typescript
typesync
vercel
webpack
webpack-cli
)
for p in "${packages[@]}"; do
volta run --no-yarn -- npm install --global "$p" || echo "$p not found"
done
volta list all