I'm using documentationjs (which uses jsdoc under the hood) to handle the generation of docs for a lib I'm working on. My lib is written is ES6 and is fully functional, and at present the documentation generated is an alphabetical list of all the functions from all the modules in the lib. This makes it very hard to find what you are looking for. How should I use jsdoc comments so that functions from one file are grouped together in the documentation?
For example, given the following file …
/**
* Docs for alpha
*/
export const alpha = () {};
/**
* Docs for beta
*/
export const beta = () {};
/**
* Docs for charlie
*/
export const charlie = () {};
… how should I use jsdoc comments to ensure the three functions are grouped together under 'Example' in the documentation?
I have tried defining a module at the top of the class: /** @module Example */
but although this generates an item called 'Example' in the docs, the functions are not grouped underneath it.
I have tried adding @memberof Example
to the documentation of the individual functions, but this has no effect.
I am aware of this question, but it doesn't work for me, possibly because of the ES6 imports. There is no mention of its use with @module
in the docs.
@memberof Example
. – Engaging