Framework-agnostic Web Component library built with Lit, vanilla TypeScript, and Tailwind CSS v4. Distributes custom elements (emc-* prefix) that work in any frontend framework or vanilla HTML.
- Node.js ≥ 20
- pnpm ≥ 11 (see
packageManagerinpackage.json)
pnpm install
pnpm build # builds @emc-dev/emc-ui| Script | Description |
|---|---|
pnpm build |
Build @emc-dev/emc-ui (turbo run build) |
pnpm build:emc-ui |
Build the emc-ui package directly |
pnpm analyze |
Bundle-size report (esbuild-visualizer) |
pnpm watch |
Watch mode (turbo run dev) |
pnpm test / pnpm test:watch |
Run unit tests (vitest) |
pnpm lint / pnpm lint:fix |
ESLint |
pnpm format / pnpm format:check |
Prettier |
pnpm changeset |
Create a changeset entry |
pnpm version |
Bump versions and update CHANGELOG |
pnpm release |
Build and publish via Changesets |
packages/
emc-ui/ the @emc-dev/emc-ui library (src/**, tsup.config.ts)
docs/ DESIGN.md, FUTURE_IMPLEMENTATIONS.md
Publishes to the public npm registry under the @emc-dev scope via GitHub trusted publishing (OIDC).
pnpm changeset # add a changeset for your change
pnpm version # bump version and update CHANGELOG
pnpm release # build + publish (also runs in CI)The package is bundled by tsup with ESM + CJS outputs and .d.ts declarations. The files field limits the tarball to dist/, README.md, CHANGELOG.md, and LICENSE.
GitHub Actions:
.github/workflows/ci.yml— on every push tomainand PRs: install → lint → format → build → analyze → test..github/workflows/release.yml— onmain: useschangesets/actionto open a versioning PR; when merged, runspnpm releaseto publish via GitHub trusted publishing (no npm token required).
Unit tests with vitest:
pnpm test # run once
pnpm test:watch # watch modeSpecs live in packages/emc-ui/src/test/**.