Documentation Development
Running in Development Mode
The documentation includes live, interactive examples embedded via iframes. To see them working locally:
Option 1: Quick Start (Run Everything)
Open two terminals:
Terminal 1 - Start all example servers:
bash
cd docs
npm run dev:examplesTerminal 2 - Start documentation:
bash
cd docs
npm run devThen visit http://localhost:5173 - all embedded examples will be working!
Option 2: Run Individual Examples
If you only want to test specific examples, you can run them individually:
bash
# Example: run vanilla basic example
cd examples/01-vanilla-basic
npm run devThen start the docs as normal. The iframe will connect to whichever examples are running.
Production Build
To build everything for production:
bash
cd docs
npm run buildThis will:
- Generate API documentation with TypeDoc
- Build the VitePress documentation
- Build all 9 examples and copy them to
docs/.vitepress/dist/examples/
The examples are served as static files alongside the documentation in production.
Example Port Mapping
Each example runs on its own port in development:
01-vanilla-basic: 300102-vanilla-streaming: 300203-vanilla-microphone: 300304-react-basic: 300405-react-streaming: 300506-react-microphone: 300607-vue-basic: 300708-vue-streaming: 300809-vue-microphone: 3009