@enveritas/design-tokens
v0.4.1
Published
This repository contains the design tokens of the Enveritas Design System (`eds`). The design tokens are prepared to synchronize with the Figma Token Studio plugin via Github. The tokens are converted into distribution formats with [style-dictionary](http
Keywords
Readme
Enveritas Design Tokens
This repository contains the design tokens of the Enveritas Design System (eds).
The design tokens are prepared to synchronize with the Figma Token Studio plugin via Github. The tokens are converted into distribution formats with style-dictionary.
General Structure
There are four main folders relevant to this repository:
scriptsContains the style-dictionary instructions for building the corresponding style dictionaries.src/tokensContains the style dictionaryfigma.jsonthat is synchronized with the Figma Token Studio plugin. The initial set of tokens was computed based on a set of base tokens which can be found in the initial commit.distContains the style dictionaries for further distribution and consumption of other modules.
Scripts
There are three different scripts for creating the style dictionaries:
scripts/dist.jsThis script prepares the tokens fromsrc/tokens/figma.jsoninto the defined distribution style dictionaries. These dictionaries are written into the folderdist.
Workflow
The file src/tokens/figma.json should be synchronized on the figma branch with the Figma Token Studio Plugin. Updates from Figma can be pushed through Figma in a pull request. After merging to the main branch, the distribution sets can be generated with the dist.js script.
Releasing
@enveritas/design-tokens is released with nx release and uses Nx version plans.
For the shared process, see:
Version plans
Changes to the design tokens that should ship in a release must be captured in a version plan. The version plan determines both:
- the semver bump (
patch,minor,major) - the changelog contents for the release
Unlike the default Nx changelog behavior, this package uses a custom changelog renderer that preserves the markdown from the version plan as-is. That means the version plan message should be written as final changelog-ready markdown.
Example:
---
"@enveritas/design-tokens": patch
---
### Changed
- updated token values for the blue palette
- renamed semantic token `foo` to `bar`
### Added
- added new semantic tokens for alertsCreate a version plan from the package directory with:
pnpm run release:planDry run
Before creating a real release, run:
pnpm run release --dry-runThis previews the version bump and the CHANGELOG.md update without publishing anything.
Release
To create the release entry for this package, run:
pnpm run releaseThis package-level script runs nx release --groups=design-tokens --skip-publish.
During the release flow:
- the next version is derived from the version plan
package.jsonis updatedCHANGELOG.mdis updated from the version plan markdown- the version plan file is removed after it has been processed
- a git commit and tag are created by Nx
Related guides
- Shared release preparation: ../../guides/release-preparation.md
- Shared publishing workflow: ../../guides/publishing.md
Notes
- Release version resolution prefers Git tags and falls back to
package.jsonon disk. - This release group has
updateDependentsset tonever, so releasingdesign-tokensdoes not automatically bump@enveritas/component-library-react. - If there is a pending version plan for this package, make sure to release the
design-tokensgroup before running a release scoped only to another group.
