Created
July 20, 2012 19:45
-
-
Save ChimeraCoder/3152820 to your computer and use it in GitHub Desktop.
npm (node.js) equivalent of Python's pip freeze?
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
#Please tell me there is a better way to do this | |
#(And by 'a better way', I don't mean incorporating the cut within the awk script) | |
npm ls | grep -E "^(├|└)─" | cut -d" " -f2 | awk '{FS = "@"; print "\""$1"\"", ":", "\""$2"\""}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You might like npm shrinkwrap: http://blog.nodejs.org/2012/02/27/managing-node-js-dependencies-with-shrinkwrap/