Last active
February 1, 2017 15:27
-
-
Save glenpike/4fefb9d195c01637ce9056f1143e4013 to your computer and use it in GitHub Desktop.
List all global npm packages when you want to install them with a new nvm version
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
#list top level packages, extract the package name, remove the .nvm line, remove the version number, reduce to single line | |
npm ls -g --depth=0 | cut -d ' ' -f2 | grep -v '.nvm' | sed -e 's/@.*//' | tr '\n' ' ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment