-
-
Notifications
You must be signed in to change notification settings - Fork 902
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
chore: add typedoc #82
Conversation
1705b9d
to
23e4498
Compare
@ericjeker now that the |
Not sure this still need to be merged as Jess already generated the docs with Vitepress and it probably needs to be integrated with Vitepress directly. |
@ericjeker could you output a |
My dream is to be able to write human documentation in Markdown surrounding auto-generated typedocs that we export in json. I'm stuck without a computer, so forgive me for pseudocode and any typos. To do this we need to:
To do this, we can create N components for the API surface area and register them globally within the docs/components file. When you register components there, they become available globally in all Markdown files // somewhere within docs
// setting up jsx is actually easy, but this is the only time we'll use raw render fn's so it's nbd
import { h } from 'vue'
import typedocs from './typedocs.json'
import CodePreview from './components/CodePreview.vue'
export const docComponents = {}
each(typedocs, (value, key) => {
docComponents['Typegen' + key] = h(CodePreview, { doc: value })
}) Now write the CodePreview Vue component to create the correct Expected API: ---
title: API Guide
---
### Addresses
### Address API <Badge text="v3.3.0" type="tip" />
The address API is best used for (etc)
<TypegenAddress/>
### City
<!-- this is my next goal -->
<Playground namespace="address" />
....
I think this is a good approach. @antfu could you give me a sanity check? Am I missing something obvious? |
Hi guys, I created another PR with a clean state as this PR was from an outdated branch: #207 |
Added typedoc.
TODO: add it in the build process in Github Actions.