Skip to content

A GitHub Action to transform and process design tokens exported from Tokens Studio.

License

Notifications You must be signed in to change notification settings

Design-System-Pro/token-tinker

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Token Tinker

A GitHub Action to transform and process design tokens exported from Tokens Studio.

Table of Contents

Overview

Token Tinker is a utility that helps you transform design tokens exported from Tokens Studio into various formats. It streamlines the process of integrating design tokens into your development workflow.

Features

  • Transform Tokens Studio exports
  • Support for multiple output formats
  • Automated token processing
  • Customizable transformation rules
  • Integration with design systems

Usage

name: Transform Design Tokens
on:
  push:
    paths:
      - 'tokens/**'

jobs:
  transform:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - uses: Design-System-Pro/[email protected]
        with:
          tokens-path: './tokens/'
          build-path: './build/'
          tokens-export-type: 'single'

      # You can replace where the build goes according to your needs 👇
      # As an example, you can download it manually from your github action runner.
      - name: Archive tinker results
        uses: actions/upload-artifact@v4
        with:
          name: result
          path: build

Configuration

Parameter Description Required
tokens-path Path to the exported tokens file Yes
build-path Path to output the transformed tokens Yes
tokens-export-type Type of Tokens Studio export: "single" for single file or "multiple" for multiple files No

action.yml Inputs

The following inputs can be defined in the action.yml file:

Input Name Description Default Required
tokens-path Path to the tokens json files ./tokens/ true
build-path Path to output the transformed tokens ./build/ true
tokens-export-type Type of Tokens Studio export: "single" or "multiple" single false

License

MIT

Contributing

Contributions welcome! Please read the contributing guidelines before submitting a PR.

About

A GitHub Action to transform and process design tokens exported from Tokens Studio.

Topics

Resources

License

Stars

Watchers

Forks