Contributing
Thanks for wanting to contribute!
Development commands to know:
pnpm dev— start the library playgroundpnpm play— start the playground (same as dev)pnpm build— build the librarypnpm build:analyze— build with bundle visualizer reportspnpm size:check— enforce package size budgetspnpm test— run unit testspnpm docs:dev— start the VitePress docs server
Size budget env overrides (optional):
MAX_DIST_BYTESMAX_JS_CHUNK_BYTESMAX_PACK_TGZ_BYTESMAX_PACK_UNPACKED_BYTES
How to add a docs page:
- Add a markdown file under
docs/ordocs/guide. - Update
docs/.vitepress/config.tssidebar if needed. - Run
pnpm docs:devto preview the page locally and ensure everything builds. - Open a PR with your changes.
Guidelines:
- Keep docs concise and example-driven
- If adding code snippets to docs, verify they run in
playgroundor tests - Add tests for any new features in
test/and updateREADME/ docs accordingly
Quick try — run the docs site locally and add a simple page to verify the flow:
bash
pnpm docs:dev
# open http://localhost:5173, add docs/guide/new-page.md and confirm build