EXAMPLES
The examples, by name: what each shows, and its files as the codebase keeps them. One that's an app runs on tcm's
server under /examples/app: the app, tcm start flags, and whether its data starts over every six
hours), as the site's examples/apps.txt lists for the server's start script. One that's a static site
(site: the app) is built into the docs site there instead (tcm build --static), and served as its files. One
that's large (a library imported whole, minutes to build) is in the code browser of what's deployed (and
pnpm docs:site's) but not of pnpm verify's check of the site, and it's checked when named (pnpm examples:check effect --tests), after changing what importing it exercises.
import { EFFECT, GEOMETRY, NOTES, POLLS, REMINDERS, USERINPUT } from "#codebase/tcmts/fixtures"; export const EXAMPLES: { name: string; title: string; files: Record<string, string | Uint8Array>; app?: { name: string; flags?: string[]; reset: boolean }; site?: string; large?: boolean; }[] = [ { name: "polls", title: "a live polling app: tables, jobs, sessions, streaming", files: POLLS, app: { name: "polls.main", reset: true }, }, { name: "notes", title: "React server components, with no directives", files: NOTES, app: { name: "notes.App", reset: true }, }, { name: "userinput", title: "an AT Protocol client: feedback boards, with React Aria", files: USERINPUT, app: { name: "userinput.app.App", flags: ["--http", "userinput.oauth=/oauth"], reset: false }, }, { name: "reminders", title: "a local-first PWA: installable, offline, a static site", files: REMINDERS, site: "reminders.App", }, { name: "geometry", title: "two packages, their releases and changelogs", files: GEOMETRY }, { name: "effect", title: "a large library, Effect, imported from its npm package", files: EFFECT, large: true, }, ]
uses
- tcmts.fixtures.EFFECT
- tcmts.fixtures.GEOMETRY
- tcmts.fixtures.NOTES
- tcmts.fixtures.POLLS
- tcmts.fixtures.REMINDERS
- tcmts.fixtures.USERINPUT