Share Compodoc output
Compodoc is the only realistic way to get a readable map of a large Angular
app: every module, component, directive, injectable and route, plus dependency
graphs and a documentation-coverage score. It writes all of that to
documentation/ and stops there.
Which means the most useful artifact in the repo is a folder on one laptop.
Build it
npx @compodoc/compodoc -p tsconfig.doc.json -d documentation --coverageTest 70
documentation/
├── index.html
├── modules/ components/ injectables/ interfaces/
├── graph/ # viz.js SVG dependency graphs
├── js/ # lunr search index + theme
└── styles/
Open index.html from the filesystem and you get most of it — until search,
which fetches its index over XHR and is blocked from a file:// origin. The
common report is "the docs work but search is broken", and it is the same
origin problem that breaks half the
generated-docs tools.
Drop the folder in
Drag documentation/ (or a zip of it) into
Comma:
index.htmlbecomes the report body — the page carrying the comment layer.- Every module and component page, the
graph/SVGs and the lunr index upload alongside it, with relative references rewritten to the uploaded copies. - Scripts run inside a sandboxed iframe (
allow-scripts, noallow-same-origin), so search works, the sidebar tree expands, and the dark-mode toggle toggles.
No gh-pages branch, no S3 bucket, no DNS.
From the docs job
npx @compodoc/compodoc -p tsconfig.doc.json -d documentation
curl -fsS -X PATCH "https://commareports.com/api/v1/reports/$REPORT_ID" \
-H "Authorization: Bearer $COMMA_API_TOKEN" \
-H "Content-Type: application/json" \
-d "$(jq -n --rawfile html documentation/index.html \
--arg t "App docs — $GITHUB_REF_NAME" '{title: $t, html: $html}')"
The API is JSON-only, so supporting pages go up through
POST /api/v1/reports/$REPORT_ID/assets as base64 — one call per file, worth
scripting once. See the API reference and
publishing from CI.
The coverage page is the one to link in a PR
--coverageTest turns documentation coverage into a build gate, and the output
folder carries the ranked list behind it: every undocumented public method,
sorted. Pasting a percentage into a PR starts an argument. Linking the page,
with a comment on the three symbols that actually matter, ends one.
Threads anchor to the rendered content, so a note on a service's constructor stays on that constructor across rebuilds — see commenting on HTML.
Who can see it
Per report: private, your team, anyone signed in at your domain, or anyone with the link. Internal app structure is not usually something to publish openly — see sharing & access control.
Limits
- Entry HTML: 5 MB. Assets: 25 MB per file, 250 MB and 500 files total.
A very large app can exceed 500 pages;
--disableCoverage,--disablePrivateand narrowingtsconfig.doc.jsonall trim the output, and usually improve it. - Scripts run, sandboxed — no same-origin access.
- 60 requests/minute per token.
Try it
Comma is free — unlimited reports, unlimited commenters, unlimited revision history.