Skip to content

Style Dictionary Writer

The writer takes your token collection and writes them to disk.

To start use styleDictionaryWriter() from @theemo/style-dictionary. Here is a basic config as template:

theemo.config.js
ts
import { styleDictionaryWriter } from '@theemo/style-dictionary';
import { defineConfig } from '@theemo/cli';

export default defineConfig({
  sync: {
    writer: {
      targets: styleDictionaryWriter({
        // your config
      })
    }
  }
});

Configuration

Style Dictionary needs to know where to put your files, the file for each token, the path (canonical name) for the token, the value and optionally custom data with it.

Customization options with examples: