Skip to content

Option to automatically group files in modules #234

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
killercup opened this issue Nov 8, 2015 · 6 comments
Open

Option to automatically group files in modules #234

killercup opened this issue Nov 8, 2015 · 6 comments

Comments

@killercup
Copy link

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.

@carbonrobot
Copy link
Contributor

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

@carbonrobot
Copy link
Contributor

Related #183

@chpio
Copy link

chpio commented Mar 5, 2016

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

@tmcw
Copy link
Member

tmcw commented Jul 28, 2017

It could be this doc generator, if you help out with a PR!

@AndyOGo
Copy link

AndyOGo commented Nov 30, 2017

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 :(

@DonGissel
Copy link

Has anyone made any progress on this? As commented on #803 I'd be happy to help, but have no idea where to start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants