Skip to content

How to group ES2015 modules? #284

@alystair

Description

@alystair

I'm in the process of converting a major project from a single monstrous JS file using a namespaced object to ES2015, and as a result it totally broke JSDoc generation.

This is my current npm run script (I've excluded a large list of custom partials for readability)
npx jsdoc-to-markdown -c jsdoc.conf --private --heading-depth 1 --files src/core/init.mjs > docs/reference-core.html

init.mjs is my entry point and pretty much looks like this

import foo from './foo.mjs';
import bar from './bar.mjs';
const app = {
  foo,
  bar,
};

globalThis.app = app;
export default app;

Obviously generating documentation for any imported module makes no sense when using 3rd party libraries, is there a way to document which imported modules are part of the project so their documentation is automatically pulled in?

What's the secret jsdoc recipe to generate a single page of documentation for app foo bar etc...? I used to @namespace religiously which worked perfectly for a large object but nothing seems to be pulled in...

Metadata

Metadata

Assignees

No one assigned

    Labels

    more infoMore info required to reproduce

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions