Skip to content

Support typedoc packages entry point strategy #289

@bollwyvl

Description

@bollwyvl

Thanks for picking this back up!

elevator pitch

Support building docs for TypeDoc monorepos.

motivation

TypeDoc supports "entryPointStrategy": "packages" which allows for documenting a number of packages together, usually (but not always) in the same @org/ namespace.

Presently, sphinx-js explicitly sets the --entryPointStrategy CLI argument... it may be possible to overload it, but I haven't looked at what this would entail in the resulting JSON.

design ideas

  • offer the config option ts_entry_point_strategy (default: expand) which can be set to packages
  • deal with all the downstream effects of this, such as directive changes
  • add a test for a monorepo-style project

alternatives

  • move all of the js_* features into a rich, type-checkable dict which can be added multiple times
sphinx_js = [
  dict(
    language = "typescript",
    source_path = "../packages/a",
    jsdoc_config_path = "../packages/b/typedoc.json",
  ),
  dict(
    language = "typescript",
    source_path = "../packages/b",
    jsdoc_config_path = "../packages/b/typedoc.json",
  ),
]

(with the above being fairly easy to automate with something like Path("../packages").glob("*/typedoc.json"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions