Automatically update all your global NodeJS packages
To automatically update your global NodeJS packages just issue the following command. It will list outdated packages and update them via npm install -g
.
npm install -g $(npm outdated -g | cut -d' ' -f 1 | sed '1d' | xargs -I '$' echo '$@latest' | xargs echo)