Repository navigation
v2.2.0
The examples are named by role, each owns its own tools, and every example-specific line is marked. This prepares the template for a scaffolding CLI that generates any combination of examples. Nothing here forces an existing project to change.
Changed
- Examples named by role (#17, #18):
sharedandlib: a library other tools import, built on shared codecli: a command people runweb: a library loaded in web pages by a script tag
- The web example owns its tools (#19). Playwright, axe, size-limit, the Playwright config and the browser tsconfig live in
packages/web, so deleting the folder removes them.pnpm test:browserandpnpm sizerun through turbo, which builds first, and passCIandPLAYWRIGHT_*through to Playwright. - Example markers (#20, #21). Every line that belongs to one example sits between
<!-- example:NAME -->,# example:NAMEor// example:NAMEmarkers. A template-only CI check keeps it that way, and CONTRIBUTING.md documents the rules. Removing any combination of examples leaves a repo that passes its own CI; all seven combinations were tested. - web has a unit test (#21), so a web-only project passes
pnpm test.
Node stays pinned at 26.12.1. Moving to the first Node 26 LTS release comes in a later update.
Changes for existing projects
These changes only matter if you want your project to match the template's new layout.
| Before (v2.1.x) | After (v2.2.0) |
|---|---|
packages/core, packages/utils (@monorepo/core, @monorepo/utils) |
packages/shared (@monorepo/shared); update imports |
packages/feature-a (@monorepo/feature-a) |
packages/lib (@monorepo/lib) |
packages/cli-example, bin cli-example |
packages/cli (@monorepo/cli), bin cli |
packages/browser-example, window.BrowserExample, data-browser-example |
packages/web (@monorepo/web), window.Web, data-web |
root playwright.config.ts, tsconfig.browser.json, and the @playwright/test, @axe-core/playwright, size-limit, @size-limit/file devDependencies |
inside packages/web |
knip.json |
deleted; knip finds the browser tests through packages/web/playwright.config.ts |
root "test:browser": "playwright test", size via pnpm -r |
turbo test:browser, turbo size; turbo.json adds both tasks (test:browser with cache: false and passThroughEnv: ["CI", "PLAYWRIGHT_*"]) |
ci.yml pnpm exec playwright … |
pnpm --filter @monorepo/web exec playwright … |
Notes:
- Without the turbo
passThroughEnv, Playwright'sforbidOnlyand its GitHub reporter turn off silently in CI. - Don't port the markers or
scripts/check-examples.*. They are template machinery for generating projects. - Projects still on v2.1.0 should also take v2.1.1's
engines.pnpm >=12guard.