Created
May 25, 2019 17:14
-
-
Save mayoralito/a0afee85b69597501e456771d5a25b26 to your computer and use it in GitHub Desktop.
This file contains 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
# Get all packages and save it to ENV variable | |
PACKAGES_TO_UPDATE=`npm outdated | awk '{print "npm install", $1"@latest", "--save; \n\r" }'` | |
# Save output to a location | |
echo $PACKAGES_TO_UPDATE > /tmp/npm-update-packages.log | |
# Open the file and remove the first line | |
# TODO: use awk to remove the first line of the file | |
vim /tmp/npm-update-packages.log | |
# Copy the content of the file and paste it on the terminal | |
# TODO: Create an script to get the output from npm outdated command and run the update against the latest version. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment