Token build pipeline for multi-platform output
token transformation across platforms.
JSON source of truth, a tool like Style Dictionary with per-platform transforms and formats, and CI publishing.
hand-maintaining separate platform files in parallel.
What's really being asked
The interviewer wants a concrete transformation architecture: one source, many platform outputs, automated. The key insight is that you transform, never hand-duplicate.
The full answer
Keep tokens as the single source of truth in platform-neutral JSON, ideally following the W3C Design Tokens Community Group format. Run them through a build tool such as Style Dictionary (or Theo) that applies platform-specific transforms and formats: it converts a hex value into an Android color resource, into an iOS UIColor or SwiftUI Color, and into a CSS custom property, and converts unitless sizes into px, dp, or pt as each platform expects. Configure one transform group and format per target so a single source emits ds.css, colors.xml, Tokens.swift, and a JSON build artifact. Wire it into CI so any token change regenerates all outputs, then publish versioned packages per platform with semantic versioning.
The mistakes people make
Maintaining a separate handwritten file per platform, which drifts the moment one platform is edited. Doing transforms manually or with ad-hoc scripts that nobody maintains. Forgetting unit and color-format conversions, shipping web px straight into Android.
What usually comes next
How do you handle references and aliases between tokens? How do you version and distribute the per-platform packages? How do you validate the JSON against a schema in CI?
A concrete example
Your tokens/color.json defines color.primary = #0A74FF. Style Dictionary runs with a web platform emitting --color-primary: #0A74FF, an android platform emitting a color resource with name color_primary, and an ios platform emitting a Swift constant. A CI job runs the build on every merge to the tokens repo and publishes @ds/tokens-web, the Android artifact, and the iOS package, each tagged with the new version.
Interview question
Why route a single JSON token source through a transformer like Style Dictionary instead of maintaining per-platform files by hand?
- a.Automated transforms emit consistent platform formats from one source, preventing cross-platform driftCorrect
- b.JSON cannot be read directly by web, iOS, or Android build systems
- c.Hand-written files compile faster than generated ones
- d.Style Dictionary is the only tool that can output CSS variables
Why? this is the answer
A transformer guarantees web, iOS, and Android outputs derive from the same source, with correct unit and color conversions, eliminating drift. The other options misstate JSON usage, performance, and tool exclusivity.
Just read this? Test yourself on what you have been reading.
Read the original → martinfowler.com
- #design-tokens
- #build-pipeline
- #style-dictionary
- #cross-platform
- #ci-cd
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on design-tokens — each one lists the topics its interview covers.
See open roles