Skip to content

Conversation

@riknoll
Copy link
Member

@riknoll riknoll commented Jan 15, 2026

fixes #127

this pr adds a new gendocs command for generating help documentation pages for an extension based on the jsdoc in the APIs. it works by fetching the symbol info for the project from the language service, which helpfully includes the jsdoc and the filepath that defines each symbol (so we can detect which APIs are from this extension). for the signature of each API at the top of the page, i use the snippets we generate for the monaco editor completions.

the command has three flags:

  • --out-dir (optional): defines the output directory for the markdown pages
  • --repo-name (required): the github repo for the extension. this is used for the package annotation at the bottom of the docs pages
  • --annotate (optional): if specified, the command will also attempt to insert the //% help annotations for you in your typescript files

one caveat to note: the makecode language service requires that there be at least two blank lines between the description of an API in JSDoc and the start of the @param annotations! i did not know this, but discovered while testing.

also adds a hidden api-info command that dumps the api info for a project in a JSON file. this is mostly for testing

@riknoll riknoll requested review from a team and jwunderl January 15, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add docs generator command for extension authors

2 participants