git clone https://github.com/hogekai/vide.git
cd vide
pnpm install
pnpm testpnpm dev # watch mode (not yet configured — use pnpm build)
pnpm build # build all entry points
pnpm typecheck # type check
pnpm lint # lint
pnpm lint:fix # lint with auto-fixpnpm test # unit tests (vitest)
pnpm test:watch # unit tests in watch mode
pnpm test:e2e # E2E tests (Playwright, requires browser install)Unit tests are in tests/ and run with vitest. Each plugin has its own test directory (e.g., tests/hls/, tests/vast/). tests/performance.test.ts covers setup timing budgets, event listener cleanup, and create/destroy cycle stability.
E2E tests are in tests/e2e/ and run with Playwright against the example pages in examples/.
First-time setup:
pnpm test:e2e:install # install browser binaries + system depsThe E2E suite covers core playback, HLS streaming, UI controls, and keyboard shortcuts. Tests run in Chromium by default and are also included in CI.
bash scripts/bundle-size.sh # build + report gzip sizes for all entry pointsCore must stay under 3 KB gzip. Size increases require justification.
- Fork → branch → commit → PR
- All tests must pass (
pnpm testandpnpm typecheck) - New features require tests
- Bundle size increases require justification
pnpm docs:api # generate API reference (TypeDoc → docs/api-reference/)
pnpm docs:dev # local VitePress dev server
pnpm docs:build # production docs build
pnpm docs:preview # preview production buildAPI reference is auto-generated from JSDoc/TypeScript via TypeDoc. The output goes to docs/api-reference/ (gitignored) and is built before docs:build in CI.
Single package, multiple entry points (vide, vide/vast, vide/hls, etc.). Dependency direction is one-way: vmap → vast → core. Never reverse, never circular.
See CLAUDE.md for design principles.
- TypeScript strict mode
- ESM only — no CJS, no UMD
- Biome for formatting and linting (tab indentation)
- No external runtime dependencies in core
- If the browser can do it natively, don't build it