Skip to content

Instantly share code, notes, and snippets.

@ehnydeel
Created October 27, 2016 08:26
Show Gist options
  • Save ehnydeel/4f635e25787b7973fec3fa084b2909f2 to your computer and use it in GitHub Desktop.
Save ehnydeel/4f635e25787b7973fec3fa084b2909f2 to your computer and use it in GitHub Desktop.
Update all global npm-packages
#Check outdated npm-packages:
npm outdated -g --depth=0
#npm-upgrade.sh
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f2)
do
npm -g install "$package"
done
#npm-upgrade-bleeding.sh
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment