How to document all npm dependencies from package.

2019-07-11 07:07发布

问题:

I want to document all npm devDependencies and dependencies described in the package.json file into the README.md file in the same project. Following properties are of interest name, description and version. Of course I could document this manually by checking package by package and documenting by hand, but are there any other automated approach to solve this?

Edit You will only find name and version of each package in the package.json file. The description property needs to be retrieved from npm, for instance by executin CLI command npm view <package name> which returns json-formatted response. see more at https://docs.npmjs.com/api/npm