-
Notifications
You must be signed in to change notification settings - Fork 98
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
Generate website API docs from code comments #1341
Comments
yes pls! 👏 For context, there were some attempts also on the rn repo a long time ago: facebook/react-native@eb7dbc8 but as far as I know it's not actually used. I can reach out to a couple folks to verify the state of that script logic UPDATE: it looks like the logic above was never used, but there was also this other attempt: https://github.com/facebook/react-native-website/tree/main/sync-api-docs but this one too has never been used |
on the Expo side of things, they use a solution based on https://typedoc.org/ to export JSON You can find the logic here: https://github.com/expo/expo/blob/main/docs/components/plugins/APISection.tsx + https://github.com/expo/expo/tree/main/docs/components/plugins/api |
Just an FYI, we are currently using TSDoc to generate the API tables for the
It has its own quirks. For instance, you have to manually concatenate the lines, parse parameters AST-style, and other things. It's doable, but not very friendly/maintainable. Would be interested to learn whether TypeDoc is better in this regard. |
Use a tool to extract APIs and types from @rnx-kit packages. Embed them into the API docs on the website.
Example packages which can help with this:
The text was updated successfully, but these errors were encountered: