api-toc
Pass a dirname, get a markdown-formatted Table of Contents for your API.
Currently this is pretty opinionated, but I may add a reduce or filter function to allow customizing the output. PR or suggestions welcome.
Install with npm
$ npm i api-toc --save
Usage
var toc = ;
Example
Using the pseudo-code in fixtures/
:
;
Results in:
The generated markdown looks like this:
+ **[config](fixtures/config.js)** - [.disable](fixtures/config.js#L10) - [.enable](fixtures/config.js#L6) - [.option](fixtures/config.js#L2)+ **[storage](fixtures/storage.js)** - [.extend](fixtures/storage.js#L10) - [.get](fixtures/storage.js#L2) - [.set](fixtures/storage.js#L6)+ **[utils](fixtures/utils.js)** - [.bar](fixtures/utils.js#L6) - [.baz](fixtures/utils.js#L10) - [.foo](fixtures/utils.js#L2)
Related projects
- helper-apidocs: Template helper for automatically generating API docs from code comments. The sync version works with… more
- markdown-toc: Generate a markdown TOC (table of contents) with Remarkable.
Running tests
Install dev dependencies:
$ npm i -d && npm test
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
Jon Schlinkert
License
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on August 01, 2015.