pnpm dev # Start the Vite docs site
pnpm build # Build all packages (via turborepo)
pnpm test # Run tests across all packages
pnpm lint # Lint all packages
pnpm lint:style # Lint SCSS filesA pre-commit hook (husky) runs lint-staged, which auto-fixes SCSS via stylelint.
Turborepo handles the dependency graph via "dependsOn": ["^build"]:
@tiny-design/tokens → @tiny-design/react → @tiny-design/docs
Each package's build step:
| Package | Build Steps |
|---|---|
| @tiny-design/tokens | node scripts/build.js — sass compiles scss/base.scss into css/base.css |
| @tiny-design/react | tsdown (TS to JS) → build-styles.js (copies base.css from tokens, compiles 78 component SCSS files) → inject-style-imports.js (adds CSS imports into JS entry files) |
| @tiny-design/docs | vite build |
Three workflows triggered on push/PR to master:
- CI (
ci.yml) — install → lint → build → test with coverage - Release (
release.yml) — useschangesets/actionto either create a "Version Packages" PR or publish to npm. The docs package is excluded from publishing. - Deploy Site (
deploy-site.yml) — builds docs with--base /tiny-design/, deploys to GitHub Pages with SPA routing support.
All three packages use fixed versioning — they always share the same version number. A changeset touching any package bumps all three together.
- Add a changeset:
pnpm changeset - Merge to
master - The Release workflow creates a "Version Packages" PR (bumps versions, updates changelogs)
- Merging that PR triggers publish to npm and site deploy