Skip to content

Instantly share code, notes, and snippets.

@ford153focus
Forked from othiym23/npm-upgrade-bleeding.sh
Created February 21, 2019 13:13
Show Gist options
  • Save ford153focus/2234bbae69689b75c5dd181735b6857a to your computer and use it in GitHub Desktop.
Save ford153focus/2234bbae69689b75c5dd181735b6857a to your computer and use it in GitHub Desktop.
a safe way to upgrade all of your globally-installed npm packages
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f2)
do
npm -g install "$package"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment