How tj/dox works
Dox turns JavaScript source comments into structured JSON, with a CLI for stdin/stdout and a programmatic API. Its principal workflow scans source for comments, associates comments with code context, parses JSDoc tags and types, and renders descriptions as Markdown; callers can then consume the structured result or request generated API Markdown. The graph reflects documented behavior and visible imports. The CLI implementation and portions of the parser are unsampled, so those links rely on the README rather than claims about unseen internals.
Main entry points: dox.js Comment scanner · dox Dox CLI · index.js Public API · api.js API Markdown
Components 11
Entry points
- Dox CLI
bin/dox - Public API
index.js
Comment parsing
- Comment scanner
lib/dox.js - Code context
lib/dox.js - Tag parser
lib/dox.js - Type parser
lib/dox.js - Markdown rendering
lib/dox.js
Output generation
- API Markdown
lib/api.js
Other components
- Developer
- markdown-it
- jsdoctypeparser
Connections 12
- Developer → Dox CLI: invokes
Readme.md - Dox CLI → Comment scanner: parses stdin
Readme.md - Developer → Public API: calls
Readme.md - Public API → Comment scanner: exports parser
index.js - Comment scanner → Code context: identifies context
lib/dox.js - Comment scanner → Tag parser: parses tags
lib/dox.js - Tag parser → Type parser: parses types
lib/dox.js - Type parser → jsdoctypeparser: uses
lib/dox.js - Comment scanner → Markdown rendering: renders descriptions
lib/dox.js - Markdown rendering → markdown-it: uses
lib/dox.js - Dox CLI → API Markdown: requests API Markdown
Readme.md - Public API → API Markdown: exports generator