depdoc
v1.0.3
Published
Auto-generate documentation using your package.json's dependencies property
Downloads
12
Maintainers
Readme
depdoc
Auto-generate documentation using your package.json's dependencies
depdoc simply scans your package.json
's dependencies
property and returns some simple information about each item. For an example, please see this package's own depdoc.md.
Install
npm install --global depdoc
CLI
Usage: depdoc <filepath> [options]
Options:
-h, --help output usage information
-V, --version output the version number
-g, --generate Generate a markdown file of the result
-p, --print Print result to the console
-c, --copy Copy result to clipboard
CLI usage:
Print result to the console
depdoc <filepath> -p
depdoc package.json -p
depdoc https://raw.githubusercontent.com/TryKickoff/generator-kickoff/master/package.json -p
Note: files hosted on github.com can also be used
Copy result to your clipboard
depdoc <filepath> -c
depdoc package.json -c
depdoc https://raw.githubusercontent.com/TryKickoff/generator-kickoff/master/package.json -c
Create markdown file of result
Default filename is depdoc.md
depdoc <filepath> -g
depdoc package.json -g dependencies
depdoc https://raw.githubusercontent.com/mrmartineau/depdoc/master/package.json -g dependencies
Non-CLI usage
depdoc can also be used in your node code, but in order for your it to parse your json, you will need to normalise it first, see below for an example from the depdoc demo site.
var depdoc = require('depdoc');
var input = document.querySelector('.packageInput').value;
var normalisedInput = input.replace(/\r?\n|\s|\r/g,'');
var result = depdoc(input, 'json');