tangem-app-android-audited/core/ui/token-gen
2026-05-04 13:50:48 +03:00
..
.gitignore
build-icons.mjs Updated on 2026-08-14 2026-05-04 13:50:48 +03:00
build-tokens.mjs Updated on 2026-08-14 2026-05-04 13:50:48 +03:00
package-lock.json
package.json
README.md

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.