|
1 | 1 | # `lit-dev-api`
|
2 | 2 |
|
3 |
| -This package contains the necessary data for generating API documentation on |
4 |
| -Lit.dev. |
| 3 | +Contains necessary data for generating Lit.dev API docs. |
5 | 4 |
|
6 |
| -## Updating API Documentation |
| 5 | +## Update Generated API Documentation |
7 | 6 |
|
8 |
| -1. Locate the configuration file for the relevant package that you want to |
9 |
| - update (e.g., `packages/lit-dev-tools-cjs/src/api-docs/configs/lit-2.ts`). |
10 |
| -2. Update the `commit` field with the desired commit hash. |
11 |
| -3. Run the following command: `npm run build --workspace lit-dev-api`. |
| 7 | +1. Update the `commit` field with the desired commit hash, within |
| 8 | + `packages/lit-dev-tools-cjs/src/api-docs/configs/lit-2.ts`. |
| 9 | +1. Execute `npm run build --workspace lit-dev-api`. |
12 | 10 |
|
13 |
| -Upon completion, the updated data will be reflected in the `pages.json` and |
| 11 | +Updated API documentation will be reflected in the `pages.json` and |
14 | 12 | `symbols.json` files.
|
15 | 13 |
|
16 | 14 | ## Archived Documentation
|
17 | 15 |
|
18 |
| -The following directories contain archived documentation and are no longer |
19 |
| -automatically updated by the process above: |
| 16 | +`lit-html-1` and `lit-element-2` contain archived documentation and are no |
| 17 | +longer automatically updated. To update the archived documentation locally, |
| 18 | +check out a version of Lit.dev prior to [Pull Request |
| 19 | +#1087](https://github.com/lit/lit.dev/pull/1087), and follow the steps listed |
| 20 | +above. |
20 | 21 |
|
21 |
| -- `lit-html-1` |
22 |
| -- `lit-element-2` |
| 22 | +## How to update Lit.dev API page templates |
23 | 23 |
|
24 |
| -Both directories include static `pages.json` and `symbols.json` files. To update |
25 |
| -the archived documentation locally, check out a version of Lit.dev prior to |
26 |
| -[Pull Request #1087](https://github.com/lit/lit.dev/pull/1087), and follow the |
27 |
| -steps listed above. |
| 24 | +For `lit-html-1` and `lit-element-2`, the data from `pages.json` and |
| 25 | +`symbols.json` are used with the `api-v1.html` template to generate the |
| 26 | +resulting HTML. Otherwise modify `api.html` for `lit-2`. |
| 27 | + |
| 28 | +Hint: Use `{{ node | dump }}` to debug the structure of the object in |
| 29 | +the template. |
0 commit comments