Reference
Contributing
Setup, conventions, PR flow. Short on purpose.
Setup
git clone <repo>
cd rikiki
npm install
npm run build # esbuild + tsc --emitDeclarationOnly
npm run watch # esbuild --watch (dev sourcemaps)
npm run typecheck # tsc --noEmit (must stay clean) dist/ is versioned · the zero-build promise applies to deck
authors, not contributors. Always commit the rebuilt dist/ with
your source change so consumers don't need to run anything.
Conventions
- English for code, comments and commit messages.
- No magic numbers in CSS · everything goes through tokens (
--sp-*,--fs-*, etc.). - No em-dashes (·) in slide content · prefer ` · ` (middle dot).
- Read MANIFESTO.md first before proposing a feature · the rejected-features list saves time.
Adding a component
- Create
src/deck-myname.ts. - Extend
LitElement, decorate with@customElementand@property. - Expose per-component tokens with sensible defaults from the theme palette · users should be able to retheme via
--deck-myname-*. - Register it in
src/index.tsif it should be auto-loaded with the full bundle. - Run
npm run build· commit bothsrc/anddist/.
// src/deck-myname.ts
import { LitElement, html, css } from 'lit';
import { customElement, property } from 'lit/decorators.js';
@customElement('deck-myname')
export class DeckMyname extends LitElement {
static override styles = css`
:host { display: block; padding: var(--rik-space-3); }
`;
@property({ type: String }) tone?: string;
override render() {
return html`<slot></slot>`;
}
}
declare global {
interface HTMLElementTagNameMap {
'deck-myname': DeckMyname;
}
} Pull requests
- One self-contained change per PR.
- Include a short rationale · what changed, why, what was considered and rejected.
- If the change is visual, attach a before/after screenshot.
npm run buildmust succeed ·npm run typecheckmust stay at 0 errors.
Bundle budget
The framework promises ~25 KB gzip for the core. The current floor is
11.3 KB. PRs that grow the bundle by more than 1 KB gzip
need to justify the increase · prefer extracting to a lazy module
(deck-overview.js / deck-help.js are the
precedent).
To measure your change:
npm run build && gzip -9 < dist/index.js | wc -c License
By contributing you agree that your contribution is licensed under the project's MIT license.