Skip to content

Instantly share code, notes, and snippets.

@hisnameisjimmy
Created February 11, 2019 15:52
Show Gist options
  • Save hisnameisjimmy/f3214cd65ebf3892d01cce6d716704f1 to your computer and use it in GitHub Desktop.
Save hisnameisjimmy/f3214cd65ebf3892d01cce6d716704f1 to your computer and use it in GitHub Desktop.
Update all NPM packages that aren't global and update the package.json
# Run this from the root directory of your project. It takes the list of outdated packages, skips the first row (since that will be
# the header row), and runs a loop on the package names that updates and saves them.
for i in $(npm outdated | awk 'FNR > 1 {print $1}'); do npm update --save $i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment