Contributing
pnpm install
pnpm exec playwright install chromiumpnpm typecheck && pnpm test && pnpm test:e2ePackages live in
packages/. Workspace packages resolve each other's TypeScript sources through thesourceexport condition, so you don't need to build them during development.pnpm testandpnpm test:e2ebuild first, so they test what gets published.Adding an action:
- Add its schema to
packages/protocol/src/schemas.ts. - Implement it in
packages/host(background group, content group or frame bridge). - Add it to a group so
permissionsFor()knows what it needs. - Test it in
tests/e2e. - Run
pnpm docs:actions.
Actions must stay declarative: no running code, scripts or HTML sent by a controller (Chrome Web Store policy, and the security model).
- Add its schema to
Templates for
npm create extension-useare inpackages/create-extension-use/templates.shared/is copied first, then the template's own folder. A.skipfile lists shared files a template doesn't want.Releases use changesets: run
pnpm changesetin your PR to describe the change.
Working on these docs
The site is built with VitePress from the docs/ folder.
pnpm docs:devpnpm docs:buildThe site is served at extension-use.appzlr.com by a Cloudflare Worker with static assets (docs/wrangler.jsonc). To publish, with wrangler logged in:
pnpm docs:deploy- The action reference is generated from the schemas. Run
pnpm docs:actionsafter changing an action, and don't editactions.mdby hand. - The package picker is a Vue component in
docs/.vitepress/theme/components/PackagePicker.vue. Update it when an option, entry point or command changes. - Link between pages with relative
.mdpaths, so links work on GitHub and on the site.