@equinor/eds-tokens-sync
v1.0.1
Published
A package for synchronizing design tokens between Figma and code.
Readme
@equinor/eds-tokens-sync
A package for synchronizing design tokens between Figma and code.
Installation
npm install @equinor/eds-tokens-syncCLI Usage
The package provides two main CLI commands for syncing tokens:
Sync from Figma to Tokens
sync-figma-to-tokens --file-key <FIGMA_LIBRARY_ID>This command fetches design tokens from Figma and updates your local token files.
Sync from Tokens to Figma
sync-tokens-to-figma --file-key <FIGMA_LIBRARY_ID>This command pushes your local design tokens to Figma. Use with caution and validate the changes in Figma variables after sync. If something unexpected happen you can revert history in Figma.
Configuration
Make sure to set up the necessary environment variables for Figma API access before running the sync commands:
- .env file with
PERSONAL_ACCESS_TOKEN: Your Figma personal access token
Development
# Build the package
npm run build
# Run in development mode
npm run dev
# Format code
npm run prettier
# Lint code
npm run lintRepository
This package is part of the Equinor Design System.
- Repository: https://github.com/equinor/design-system
- Issues: https://github.com/equinor/design-system/issues
License
MIT
