tldraw/apps/docs
Steve Ruiz b9c6bf2fe8
Auto content refresh for docs site (#1606)
This PR improves the author experience when working on the docs site. 

When running `docs-dev`, the site's content will now update whenever a
content file is changed.

### Context

In the docs project, we generate content from two sources: from API
documentation generated by api-extractor and from markdown files in the
docs/content folder. Generating API docs is a relatively slow process
because it involves building and parsing TypeScript declaration files
for each package in the monorepo; however, generating docs from the
markdown files is basically instantaneous. The same script used to
address both tasks, which meant it was too slow to run on each save.
Instead, the script needed to be run manually or the dev server would
need to be restarted.

We now split the generation into two separate scripts. First, the script
runs to generate the API content; and then a second script runs to
generate the markdown content. The second script also imports and
combines the two sources of content. When we build the docs, both
scripts are run. When a markdown file changes, the new watcher only runs
the second script. This allows the site's content to be updated quickly
without having to generate the API docs each time.

Note that this does not incorporate live changes to package APIs, though
I can't think of a time where we be developing the docs and the APIs at
the same time.

### Change Type

- [x] `documentation` — Changes to the documentation only
2023-06-17 09:46:46 +00:00
..
components Add anchor targets to our headings. (#1571) 2023-06-12 17:09:17 +00:00
content Auto content refresh for docs site (#1606) 2023-06-17 09:46:46 +00:00
pages Add contributor license agreement. (#1556) 2023-06-08 12:45:44 +00:00
public [docs] editor API (#1328) 2023-05-07 19:10:59 +01:00
scripts Auto content refresh for docs site (#1606) 2023-06-17 09:46:46 +00:00
styles [feature] add laser pointer (#1412) 2023-05-19 11:09:13 +00:00
types Auto content refresh for docs site (#1606) 2023-06-17 09:46:46 +00:00
utils transfer-out: transfer out 2023-04-25 12:01:25 +01:00
.eslintrc.json transfer-out: transfer out 2023-04-25 12:01:25 +01:00
.gitignore Auto content refresh for docs site (#1606) 2023-06-17 09:46:46 +00:00
CHANGELOG.md transfer-out: transfer out 2023-04-25 12:01:25 +01:00
content.d.ts transfer-out: transfer out 2023-04-25 12:01:25 +01:00
LICENSE readmes 2023-05-04 13:47:56 +01:00
next.config.js transfer-out: transfer out 2023-04-25 12:01:25 +01:00
package.json Auto content refresh for docs site (#1606) 2023-06-17 09:46:46 +00:00
README.md transfer-out: transfer out 2023-04-25 12:01:25 +01:00
tsconfig.content.json transfer-out: transfer out 2023-04-25 12:01:25 +01:00
tsconfig.json transfer-out: transfer out 2023-04-25 12:01:25 +01:00

tldraw-docs

tldraw