stoaken export writes the live release as JSON that Style Dictionary reads as its source: json-dtcg (W3C 2025.10) for Style Dictionary v5, or json-sd4 (hex colours, "16px", "200ms") for v4.
Your Style Dictionary config decides the platforms and formats. Stoaken doesn't run the build.
Aliases are resolved and each mode is its own file, so every build gets plain values.
Before you start
Node and style-dictionary in the project (npm install -D style-dictionary).
A Stoaken API key and a stoaken.config.json from npx stoaken init (see /docs/cli).
Setup
Add one saved target per mode. Mode names are your Brand's own (axis:mode); see /docs/exports.
[data-scheme="dark"] {
…
--color-brand-primary: #c8bdff; /** Primary actions: the one button that moves things forward. */
…
}
JavaScript from W3C JSON: durations and shadow parts come out as objects, like { value: 150, unit: "ms" }. With json-sd4 they're strings ("150ms").
iOS and Android: use Stoaken's own swift, android and compose exports (/docs/exports). Style Dictionary's built-in ios-swift and android transform groups read sizes as rem, so 8px comes out as 128.00dp.
Try it
Run the build and open build/css/variables.css. --color-brand-primary has the live release's value.
Publish a change in Stoaken, run npx stoaken export and build again. Only the changed lines differ.
Troubleshooting
Values from the wrong mode: both mode files are in source. Style Dictionary merges them, and the later file wins. Use one mode per build.
[object Object] in a native file: that format can't read the value. Use Stoaken's native exports instead.
stoaken export errors (401, unknown theme or mode) are explained in /docs/cli.
Limits
References are resolved before export, so outputReferences has no aliases to keep.
Stoaken's CI builds both JSON formats with Style Dictionary v5 (5.7.1). Style Dictionary v4 itself isn't run in Stoaken's tests.
Product names and logos are trademarks of their owners, shown only to say Stoaken works with their products; it doesn’t mean they endorse Stoaken.