Skip to content

Instantly share code, notes, and snippets.

@ChimeraCoder
Created July 20, 2012 19:45
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ChimeraCoder/3152820 to your computer and use it in GitHub Desktop.
Save ChimeraCoder/3152820 to your computer and use it in GitHub Desktop.
npm (node.js) equivalent of Python's pip freeze?
#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"\""}'
@baldurthoremilsson
Copy link

@dminkovsky
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment