Question

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.

Was it helpful?

Solution

I think you want to do

npm ls -json
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top