Skip to content
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

feat(): experimental support for typedoc generation #17377

Closed
wants to merge 1 commit into from

Commits on Aug 17, 2022

  1. feat(): experimental support for typedoc generation

    Run `npm run typedoc` to generate docs in `typedoc-docs` dir.
    
    I thought I'd take a few mins and set this up.  It was _mostly_ straightforward, except:
    
    1. Figuring out the "entry point" for each package was difficult until I realized `.js` entry points are assumed to be compiled, and thus require a `sourceMappingUrl` reference. IMO this is probably a bug in TypeDoc
    2. The `sourceMappingUrl` must reference an external sourcemap file; not an inline source map.  If it's an inline source map, the system tries to `fs.open` a large data-url.
    3. The babel config does not control whether external sourcemaps are created; `@babel/cli` does. So I needed to change those.
    4. Practically speaking, I don't see any drawback to external sourcemaps _yet_
    5. TypeDoc has poor support for cross-package type references in monorepos, and I had to add a plugin which implements a workaround
    6. Per some suggestions in the docs, I modified the order of references in the root `tsconfig.json` to start with "the biggest one first"
    
    I didn't modify any types or docstrings anywhere.
    boneskull committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    fb144fa View commit details
    Browse the repository at this point in the history