documentation
documentation copied to clipboard
Option to automatically group files in modules
I'm a big fan on inferring documentation properties from code: I'm using documentation.js mainly because it allows me to omit the ‘boring’ parts of doc comments by using Flow types. Similarly, since my code uses CommonJS/ES2015 import/exports, I've never seen the value in manually adding JSDoc's @module tag to all my files.
Thus, I want to suggest a new option for documentation.js: Infer modules from file names.
Let's say I have a src/foo/bar.js. Its module name is the same as the name I can require() or import it with, i.e. foo/bar.
I'm not sure what your plans for handling modules/grouping documentation items is in general, but for larger projects, I'd like to see a documentation.js theme that lists entries in a tree instead of a flat list.
Ideally, this would also allow me to see which items are exported from a module.
Should follow the guidelines in JSDoc as well for module resolution.
The @module tag marks the current file as being its own module. All symbols in the file are assumed to be members of the module unless documented otherwise.
If the module name is not provided, it is derived from the module's path and filename.
http://usejsdoc.org/tags-module.html
Related #183
is there another doc generator which can group function/classes/$things into modules? I don't want to show a list with hundreds of functions without any hierarchy or structure. ohh... here's the catch: it should have ES7 support
It could be this doc generator, if you help out with a PR!
I wish this too, so far I used the documentation.yml config workaround to describe a non-flat hierarchy as described here:
https://github.com/documentationjs/documentation/blob/master/docs/CONFIG.md
With a drawback, existing groups defined in yml duplicates TOC of that group :(
Has anyone made any progress on this? As commented on #803 I'd be happy to help, but have no idea where to start.