5

I am trying to write a small application that wraps some functions inside of NPM from another language. "npm list" is giving me output with a nice visual tree, but I need something easier to parse. -parsable is giving me a flat list of modules, but I would like to have some of the metadata available in "npm ll". Is there a switch or something for NPM that lets me get JSON output? Right now the only way I can figure to do this is to write a node app that uses the npm module to push json to the standard output.

1
  • Check with Isaacs, but you may be allowed to hit the npm datastore directly. Commented Jan 12, 2012 at 7:44

1 Answer 1

15

I think you want to do

npm ls --json
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.