Skip to content

Drop the token build step - #11

Merged
Drixled merged 1 commit into
mainfrom
chore/drop-token-build
Nov 10, 2026
Merged

Drixled merged 1 commit into
mainfrom
chore/drop-token-build

Conversation

@Drixled

@Drixled Drixled commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

What this does

tokens.json can be read directly by people and agents, and no product consumes a generated file. The only user of src/tokens.css was the north-star app, so the conversion now lives there.

  • Removed: build/, the committed src/tokens.css, the node build command, and the CI check that the generated file was current.
  • Moved: north-star/tokens-css.ts turns tokens.json into CSS variables. A small plugin in north-star/vite.config.ts runs it when the app starts or builds.
  • Validation kept: the app refuses to start or build if a role is missing in one mode or an alias points nowhere.
  • CI: now runs pnpm --dir north-star build, which validates tokens.json and typechecks the app.
  • Skill arena: no longer imports from build/; it reads tokens.json itself.
  • README: two decisions reworded. "One source, generated artifacts" is now "one source, nothing generated yet", and the staleness check is gone.

What this gives up

A ready-made CSS file a product could copy. That is needed when Desktop adopts, and the format is a decision to make with the Desktop developer then.

How to check

pnpm install
pnpm run dev     # http://localhost:8732
pnpm run build

Checked locally:

  • The CSS the app serves is byte-identical to the old src/tokens.css, apart from its two header comments.
  • Deleting one light-mode role from tokens.json fails the build with a message naming the role.
  • Saving tokens.json while the dev server runs restarts it with the new values.
  • Foundations, Components (light) and a Desktop screen (dark) were viewed in screenshots.
  • The skill arena server starts; pnpm install --frozen-lockfile passes.

tokens.json is read directly by people and agents, and no product consumes
a generated file. The north-star app now turns tokens.json into CSS
variables when it starts, and validates it there. Removes build/, the
committed src/tokens.css and the CI staleness check; CI runs the app build
instead.
@Drixled
Drixled merged commit 02464d7 into main Nov 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant