1
mirror of https://github.com/jakejarvis/dotfiles.git synced 2025-04-25 15:35:21 -04:00

nvm 🐌 -> volta

https://volta.sh/
This commit is contained in:
Jake Jarvis 2021-08-07 18:13:59 -04:00
parent ad0839a1da
commit 49b8860694
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
5 changed files with 32 additions and 19 deletions

View File

@ -93,10 +93,6 @@ brew "git-crypt"
brew "gh"
brew "hub"
# Node & NPM / NVM
brew "node"
brew "nvm"
# Mostly ordinary binaries
brew "act"
brew "aws-shell"
@ -187,14 +183,12 @@ brew "torsocks"
brew "travis"
brew "twilio/brew/twilio"
brew "typescript"
brew "watchman"
brew "whois", link: true
brew "wireguard-tools"
brew "wireguard-go"
brew "wp-cli"
# brew "wpengine/wpe-cli/wpe-cli"
brew "xz"
brew "yarn"
brew "youtube-dl"
brew "yq"
brew "yuicompressor"

View File

@ -2,25 +2,37 @@
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
fi
volta install node@lts
volta install node@latest # remove when LTS officially supports arm64
volta install npm@6 # having issues with npm@7 and volta
volta install yarn@1
volta list node
volta list npm
volta list yarn
# npm ls --global --parseable --depth=0 | awk '{gsub(/\/.*\//,"",$1); print}' | sort -u
packages=(
@11ty/eleventy
@ampproject/toolbox-cli
@babel/cli
@babel/core
@lhci/cli
autoprefixer
browserify
eslint
express
express-generator
firebase-tools
gatsby-cli
gitmoji-cli
gulp
is-up-cli
json-server
netlify-cli
newman
nodemon
npm-check-updates
pm2
@ -32,13 +44,15 @@ packages=(
serve
standard
stylelint
superstatic
svgo
terser
vercel
webpack
webpack-cli
yo
)
for p in "${packages[@]}"; do
npm install --global "$p" || echo "$p not found"
done
volta list all

View File

@ -47,6 +47,9 @@ compinit -C
# Load everything!
source $ZSH/oh-my-zsh.sh
export ZPLUG_HOME=/opt/homebrew/opt/zplug
source $ZPLUG_HOME/init.zsh
# Fix slow paste problem w/ zsh-syntax-highlighting plugin
# https://github.com/zsh-users/zsh-syntax-highlighting/issues/295
zstyle ':bracketed-paste-magic' active-widgets '.self-*'

View File

@ -45,9 +45,8 @@ update() {
brew cleanup
echo -e "${YELLOW}Updating NPM/Yarn packages...${NC}"
npm install npm@latest --global
npm update --global
yarn global upgrade
volta run npm update --global
volta run yarn global upgrade
echo -e "${YELLOW}Updating Ruby gems...${NC}"
gem update --system
@ -65,8 +64,8 @@ update() {
echo -e "${YELLOW}Updating Oh-My-ZSH...${NC}"
omz update
# echo -e "${YELLOW}Updating MAS apps...${NC}"
# mas upgrade
echo -e "${YELLOW}Updating MAS apps...${NC}"
mas upgrade
echo -e "${YELLOW}Check for macOS system updates...${NC}"
softwareupdate --list

View File

@ -16,6 +16,7 @@ export PATH="$GOPATH/bin:$PATH"
#export PATH="$GOROOT/bin:$PATH"
# Ruby
export PATH="$HOME/.gem/ruby/3.0.0/bin:$PATH"
export RUBY_HOME="$HOMEBREW_PREFIX/opt/ruby/bin"
export GEM_PATH="$HOMEBREW_PREFIX/lib/ruby/gems/3.0.0/bin"
export PATH="$RUBY_HOME:$PATH"
@ -50,8 +51,6 @@ export PATH="$HOME/.config/yarn/global/node_modules/.bin:$PATH"
export PATH="$HOMEBREW_PREFIX/opt/make/libexec/gnubin:$PATH"
export PATH="$HOMEBREW_PREFIX/opt/whois/bin:$PATH"
export PATH="$HOMEBREW_PREFIX/opt/jpeg-turbo/bin:$PATH"
#export LDFLAGS="-L$HOMEBREW_PREFIX/opt/jpeg-turbo/lib"
#export CPPFLAGS="-I$HOMEBREW_PREFIX/opt/jpeg-turbo/include"
# pyenv
export PYENV_ROOT="$HOME/.pyenv"
@ -61,6 +60,10 @@ if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
# volta
export VOLTA_HOME="$HOME/.volta"
export PATH="$VOLTA_HOME/bin:$PATH"
# ----- Third-party additions below: -----
# Google Cloud SDK