Last active
March 30, 2018 21:46
-
-
Save HR/2144dd3432840bcabfd27e47ee36d475 to your computer and use it in GitHub Desktop.
NPM update all global packages to latest version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
set -x | |
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f2 | sed 's/@.*//g') | |
do | |
npm -g install "$package@latest" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment