Reference

Contributing

Setup, conventions, PR flow. Short on purpose.

Setup

terminal
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

  1. Create src/deck-myname.ts.
  2. Extend LitElement, decorate with @customElement and @property.
  3. Expose per-component tokens with sensible defaults from the theme palette · users should be able to retheme via --deck-myname-*.
  4. Register it in src/index.ts if it should be auto-loaded with the full bundle.
  5. Run npm run build · commit both src/ and dist/.
src/deck-myname.ts
// 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 build must succeed · npm run typecheck must 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:

terminal
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.