The docs site is built with Astro. Development is done via the integrated dev server:
npm run devWhile the server is running any changes to the docs site would be reloaded dynamically. Additionally, the library source code is also watched, so that any changes to the documentation of functions would also be reloaded dynamically.
To check and lint your project, including both .astro files and .ts and
.tsx files use check and lint, This is also run automatically on each
commit via a git hook.
npm run check
npm run lintIn rare cases where changes are being made to the content loaders or their schemas you will need to run sync which would regenerate types for these changes.
npm run syncA few features rely on static scripts which are not part of the astro site
(like the dark mode theme switcher). These are found in
src/scripts. Astro's HMR will not detect changes
to these files dynamically while the dev server is running, but they will be
rebuilt every time the server is started.
Finally, to check a production build flow end-to-end you can use astro's preview feature. This would run the same build flow that is used in CI/CD.
npm run build
npm run previewContent for the function documentation comes from Typedoc.
Content for the guides in front of the function documentation is in src/content/docs-articles.
Content for the migration guides is in src/content/mapping.
For a seamless development experience, open the docs directory as a top-level project in VSCode:
code docsThis setup ensures that all VSCode tooling and extensions (typescript, prettier, eslint) work correctly within the documentation project context.
Important!: When running under the root repository folder, vscode will not run prettier or eslint on the files of the docs site as they are disabled in the main project for the docs folder; but lint-staged will still run them, so you will still see the auto-fixes and auto-formatting run, and the commit would still fail on errors.