mix jetons.build (jetons v0.2.2)

Copy Markdown View Source

Generates output from design tokens.

Config-based

config :jetons,
  css: [
    transformer: Jetons.CSS.Transformer,
    resolver: "tokens.resolver.json",
    set: [theme: "dark"],
    output: "priv/static/tokens.css"
  ]

# Or with Token Studio directory
config :jetons,
  css: [
    transformer: Jetons.CSS.Transformer,
    token_studio: "tokens/",
    set: [theme: "light"],
    output: "priv/static/tokens.css"
  ]

mix jetons.build           # All transformers
mix jetons.build css      # Specific

CLI-based

mix jetons.build -f tokens.json -o output.css
mix jetons.build -f design.resolver.json -o output.css --set theme=dark
mix jetons.build -f tokens/ -o output.css --set theme=ACME-Light  # Token Studio directory
mix jetons.build -m MyApp.Tokens -o output.css

Token Studio directories are auto-detected when they contain a $themes.json file.