CI & release

banira is built for CI: a smoke test that needs no per-component code, and a manifest diff that suggests the release type.

A CI smoke gate

banira test compiles and mounts every element in your sources and asserts each one registers and upgrades to an HTMLElement. It exits non-zero on the first failure, so it's a one-line CI gate:

.github/workflows/ci.yml
$ banira test src/*.ts

A size & render budget

Commit a baseline of each element's emitted size (raw + gzip) and first-render time, then fail CI when a change grows any of them beyond a threshold (default 10%):

budget
# create / refresh the baseline
$ banira test src/*.ts --budget budget.json --update-budget
# CI gate
$ banira test src/*.ts --budget budget.json

Diff for a semver bump

Commit the generated custom-elements.json, then on each change compare the new manifest against the committed baseline. banira diff classifies the change:

release gate
$ banira diff baseline/custom-elements.json custom-elements.json
Add --json to consume the diff programmatically in a release script, or --changelog CHANGES.md --heading 1.4.0 for a paste-ready release-notes block.

Publish the docs

This very site is built and deployed by GitHub Actions: the static pages plus a freshly generated TypeDoc API reference, published to GitHub Pages on every push to main. Per-component reference pages come from banira doc, which defaults to PicoCSS but can inline a local stylesheet for a fully offline page.

Publish the package

Ship the compiled output plus the generated .d.ts from banira types so consumers get typed querySelector/createElement with no runtime import. banira itself publishes to npm with provenance via Trusted Publishing (OIDC) — no long-lived token stored.