Add lit-labs/context docs#1100
Conversation
|
A live preview of this PR will be available at the URL(s) below. https://pr1100-51a9bb2---lit-dev-5ftespv5na-uc.a.run.app/ |
|
This is looking relatively good. We need a lot more jsdoc in the package, and it'd be really nice to be able to order things so that |
15047da to
c6f2a80
Compare
fa63b3b to
495af6e
Compare
| /** @lit-labs/context symbol ordering */ | ||
| 'createContext', | ||
| 'consume', | ||
| 'provide', |
There was a problem hiding this comment.
Let's add ContextConsumer, ContextProvider, and ContextRoot here for now.
| tsConfigPath: pathlib.join(contextDir, 'tsconfig.json'), | ||
| entrypointModules: [ | ||
| pathlib.join(contextSrcDir, 'index.ts'), | ||
| pathlib.join(contextSrcDir, 'lib/context-request-event.ts'), |
There was a problem hiding this comment.
Do we need these other files as entrypoint modules? Since we want everything importing from index, can typedoc not just find them in the module graph?
There was a problem hiding this comment.
Agree - I have to investigate this now that I have stabilized updating all the underlying stuff & fixed many other confounding issues.
Previously when I only used the entrypoint we only got a small cross section of APIs generated. See https://pr1092-ec9e4af---lit-dev-5ftespv5na-uc.a.run.app/docs/api/context/ as an example.
But many things have been fixed since then & I understand what is going on better now. Will try this again to clean it up.
Great comment!
| let [_, pkg, pathMinusExtension] = match; | ||
|
|
||
| if (pkg === 'labs/context') { | ||
| console.log(pkg, pathMinusExtension); |
| const allPages: Pages = []; | ||
| const allSymbols: SymbolMap = {}; | ||
| for (const pkg of config.packages) { | ||
| const app = new typedoc.Application(); |
There was a problem hiding this comment.
At some point I thought I read some docs that typedoc had options for a monorepo, so you didn't need to make a new app for each package. I can't remember it though. This might matter for getting crosslinks between packages. Right now ReactiveElement say isn't a link in the context docs.
There was a problem hiding this comment.
Yeah - I need to investigate this further. I feel like I read that somewhere as well.
Add (correctly this time), the lit-labs/context documentation.
Note - there is still a strange issue with some of the complex
types. This issue is what made me notice #1099Depends on #1093