tangem-app-android-audited/core/ui/token-gen
2026-04-30 13:16:11 +03:00
..
.gitignore Updated on 2026-08-14 2026-04-21 14:29:35 +03:00
build-tokens.mjs Updated on 2026-08-14 2026-04-30 13:16:11 +03:00
package-lock.json Updated on 2026-08-14 2026-04-21 14:29:35 +03:00
package.json Updated on 2026-08-14 2026-04-21 14:29:35 +03:00
README.md Updated on 2026-08-14 2026-04-30 13:16:11 +03:00

token-gen

Generates Kotlin (Jetpack Compose) source files from design tokens defined in the ds-tokens git submodule.

Updating tokens

  1. Update the ds-tokens submodule to the latest commit:
    git submodule update --remote core/ui/ds-tokens
    
  2. Re-run the build:
    cd core/ui/token-gen && npm run build
    
  3. Commit both the submodule pointer and generated files.

How it works

The script uses Style Dictionary v5 with @tokens-studio/sd-transforms to read JSON token files from core/ui/ds-tokens/tokens/ and generate Kotlin files into core/ui/src/main/java/com/tangem/core/ui/res/generated/.

All generated files are written to com.tangem.core.ui.res.generated and should not be edited manually.