@marioschmidt/design-system-tokens 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +767 -0
- package/dist/css/base/index.css +8 -0
- package/dist/css/base/primitive-color-value-global.css +100 -0
- package/dist/css/base/primitive-color-value.css +100 -0
- package/dist/css/base/primitive-font-value-global.css +49 -0
- package/dist/css/base/primitive-font-value.css +49 -0
- package/dist/css/base/primitive-size-value-global.css +55 -0
- package/dist/css/base/primitive-size-value.css +55 -0
- package/dist/css/base/primitive-space-value-global.css +31 -0
- package/dist/css/base/primitive-space-value.css +31 -0
- package/dist/css/density/density-compact-global.css +14 -0
- package/dist/css/density/density-compact.css +14 -0
- package/dist/css/density/density-default-global.css +14 -0
- package/dist/css/density/density-default.css +14 -0
- package/dist/css/density/density-spacious-global.css +14 -0
- package/dist/css/density/density-spacious.css +14 -0
- package/dist/css/density/index.css +7 -0
- package/dist/css/mapping/brand-advertorial-global.css +277 -0
- package/dist/css/mapping/brand-advertorial.css +277 -0
- package/dist/css/mapping/brand-bild-global.css +277 -0
- package/dist/css/mapping/brand-bild.css +277 -0
- package/dist/css/mapping/brand-color-bild-global.css +74 -0
- package/dist/css/mapping/brand-color-bild.css +74 -0
- package/dist/css/mapping/brand-color-sportbild-global.css +74 -0
- package/dist/css/mapping/brand-color-sportbild.css +74 -0
- package/dist/css/mapping/brand-sportbild-global.css +277 -0
- package/dist/css/mapping/brand-sportbild.css +277 -0
- package/dist/css/mapping/index.css +9 -0
- package/dist/css/semantic/advertorial/breakpoints/breakpoint-advertorial-lg-global.css +490 -0
- package/dist/css/semantic/advertorial/breakpoints/breakpoint-advertorial-lg.css +490 -0
- package/dist/css/semantic/advertorial/breakpoints/breakpoint-advertorial-md-global.css +490 -0
- package/dist/css/semantic/advertorial/breakpoints/breakpoint-advertorial-md.css +490 -0
- package/dist/css/semantic/advertorial/breakpoints/breakpoint-advertorial-sm-global.css +490 -0
- package/dist/css/semantic/advertorial/breakpoints/breakpoint-advertorial-sm.css +490 -0
- package/dist/css/semantic/advertorial/breakpoints/breakpoint-advertorial-xs-global.css +490 -0
- package/dist/css/semantic/advertorial/breakpoints/breakpoint-advertorial-xs.css +490 -0
- package/dist/css/semantic/advertorial/breakpoints/index.css +8 -0
- package/dist/css/semantic/advertorial/color/color-advertorial-dark-global.css +425 -0
- package/dist/css/semantic/advertorial/color/color-advertorial-dark.css +425 -0
- package/dist/css/semantic/advertorial/color/color-advertorial-light-global.css +425 -0
- package/dist/css/semantic/advertorial/color/color-advertorial-light.css +425 -0
- package/dist/css/semantic/advertorial/color/index.css +6 -0
- package/dist/css/semantic/bild/breakpoints/breakpoint-bild-lg-global.css +490 -0
- package/dist/css/semantic/bild/breakpoints/breakpoint-bild-lg.css +490 -0
- package/dist/css/semantic/bild/breakpoints/breakpoint-bild-md-global.css +490 -0
- package/dist/css/semantic/bild/breakpoints/breakpoint-bild-md.css +490 -0
- package/dist/css/semantic/bild/breakpoints/breakpoint-bild-sm-global.css +490 -0
- package/dist/css/semantic/bild/breakpoints/breakpoint-bild-sm.css +490 -0
- package/dist/css/semantic/bild/breakpoints/breakpoint-bild-xs-global.css +490 -0
- package/dist/css/semantic/bild/breakpoints/breakpoint-bild-xs.css +490 -0
- package/dist/css/semantic/bild/breakpoints/index.css +8 -0
- package/dist/css/semantic/bild/color/color-bild-dark-global.css +425 -0
- package/dist/css/semantic/bild/color/color-bild-dark.css +425 -0
- package/dist/css/semantic/bild/color/color-bild-light-global.css +425 -0
- package/dist/css/semantic/bild/color/color-bild-light.css +425 -0
- package/dist/css/semantic/bild/color/index.css +6 -0
- package/dist/css/semantic/sportbild/breakpoints/breakpoint-sportbild-lg-global.css +490 -0
- package/dist/css/semantic/sportbild/breakpoints/breakpoint-sportbild-lg.css +490 -0
- package/dist/css/semantic/sportbild/breakpoints/breakpoint-sportbild-md-global.css +490 -0
- package/dist/css/semantic/sportbild/breakpoints/breakpoint-sportbild-md.css +490 -0
- package/dist/css/semantic/sportbild/breakpoints/breakpoint-sportbild-sm-global.css +490 -0
- package/dist/css/semantic/sportbild/breakpoints/breakpoint-sportbild-sm.css +490 -0
- package/dist/css/semantic/sportbild/breakpoints/breakpoint-sportbild-xs-global.css +490 -0
- package/dist/css/semantic/sportbild/breakpoints/breakpoint-sportbild-xs.css +490 -0
- package/dist/css/semantic/sportbild/breakpoints/index.css +8 -0
- package/dist/css/semantic/sportbild/color/color-sportbild-dark-global.css +425 -0
- package/dist/css/semantic/sportbild/color/color-sportbild-dark.css +425 -0
- package/dist/css/semantic/sportbild/color/color-sportbild-light-global.css +425 -0
- package/dist/css/semantic/sportbild/color/color-sportbild-light.css +425 -0
- package/dist/css/semantic/sportbild/color/index.css +6 -0
- package/dist/js/base/index.js +15 -0
- package/dist/js/base/primitive-color-value.js +98 -0
- package/dist/js/base/primitive-font-value.js +47 -0
- package/dist/js/base/primitive-size-value.js +53 -0
- package/dist/js/base/primitive-space-value.js +29 -0
- package/dist/js/density/density-compact.js +12 -0
- package/dist/js/density/density-default.js +12 -0
- package/dist/js/density/density-spacious.js +12 -0
- package/dist/js/density/index.js +13 -0
- package/dist/js/mapping/brand-advertorial.js +276 -0
- package/dist/js/mapping/brand-bild.js +277 -0
- package/dist/js/mapping/brand-color-bild.js +78 -0
- package/dist/js/mapping/brand-color-sportbild.js +78 -0
- package/dist/js/mapping/brand-sportbild.js +280 -0
- package/dist/js/mapping/index.js +17 -0
- package/dist/js/semantic/advertorial/breakpoints/breakpoint-advertorial-lg.js +477 -0
- package/dist/js/semantic/advertorial/breakpoints/breakpoint-advertorial-md.js +477 -0
- package/dist/js/semantic/advertorial/breakpoints/breakpoint-advertorial-sm.js +477 -0
- package/dist/js/semantic/advertorial/breakpoints/breakpoint-advertorial-xs.js +477 -0
- package/dist/js/semantic/advertorial/breakpoints/index.js +15 -0
- package/dist/js/semantic/advertorial/color/color-advertorial-dark.js +347 -0
- package/dist/js/semantic/advertorial/color/color-advertorial-light.js +343 -0
- package/dist/js/semantic/advertorial/color/index.js +11 -0
- package/dist/js/semantic/bild/breakpoints/breakpoint-bild-lg.js +478 -0
- package/dist/js/semantic/bild/breakpoints/breakpoint-bild-md.js +478 -0
- package/dist/js/semantic/bild/breakpoints/breakpoint-bild-sm.js +478 -0
- package/dist/js/semantic/bild/breakpoints/breakpoint-bild-xs.js +478 -0
- package/dist/js/semantic/bild/breakpoints/index.js +15 -0
- package/dist/js/semantic/bild/color/color-bild-dark.js +347 -0
- package/dist/js/semantic/bild/color/color-bild-light.js +343 -0
- package/dist/js/semantic/bild/color/index.js +11 -0
- package/dist/js/semantic/sportbild/breakpoints/breakpoint-sportbild-lg.js +479 -0
- package/dist/js/semantic/sportbild/breakpoints/breakpoint-sportbild-md.js +479 -0
- package/dist/js/semantic/sportbild/breakpoints/breakpoint-sportbild-sm.js +479 -0
- package/dist/js/semantic/sportbild/breakpoints/breakpoint-sportbild-xs.js +479 -0
- package/dist/js/semantic/sportbild/breakpoints/index.js +15 -0
- package/dist/js/semantic/sportbild/color/color-sportbild-dark.js +347 -0
- package/dist/js/semantic/sportbild/color/color-sportbild-light.js +343 -0
- package/dist/js/semantic/sportbild/color/index.js +11 -0
- package/dist/json/base/primitive-color-value.json +148 -0
- package/dist/json/base/primitive-font-value.json +59 -0
- package/dist/json/base/primitive-size-value.json +51 -0
- package/dist/json/base/primitive-space-value.json +27 -0
- package/dist/json/density/density-compact.json +16 -0
- package/dist/json/density/density-default.json +16 -0
- package/dist/json/density/density-spacious.json +16 -0
- package/dist/json/mapping/brand-advertorial.json +393 -0
- package/dist/json/mapping/brand-bild.json +393 -0
- package/dist/json/mapping/brand-color-bild.json +98 -0
- package/dist/json/mapping/brand-color-sportbild.json +98 -0
- package/dist/json/mapping/brand-sportbild.json +393 -0
- package/dist/json/semantic/advertorial/breakpoints/breakpoint-advertorial-lg.json +686 -0
- package/dist/json/semantic/advertorial/breakpoints/breakpoint-advertorial-md.json +686 -0
- package/dist/json/semantic/advertorial/breakpoints/breakpoint-advertorial-sm.json +686 -0
- package/dist/json/semantic/advertorial/breakpoints/breakpoint-advertorial-xs.json +686 -0
- package/dist/json/semantic/advertorial/color/color-advertorial-dark.json +307 -0
- package/dist/json/semantic/advertorial/color/color-advertorial-light.json +307 -0
- package/dist/json/semantic/bild/breakpoints/breakpoint-bild-lg.json +686 -0
- package/dist/json/semantic/bild/breakpoints/breakpoint-bild-md.json +686 -0
- package/dist/json/semantic/bild/breakpoints/breakpoint-bild-sm.json +686 -0
- package/dist/json/semantic/bild/breakpoints/breakpoint-bild-xs.json +686 -0
- package/dist/json/semantic/bild/color/color-bild-dark.json +307 -0
- package/dist/json/semantic/bild/color/color-bild-light.json +307 -0
- package/dist/json/semantic/sportbild/breakpoints/breakpoint-sportbild-lg.json +686 -0
- package/dist/json/semantic/sportbild/breakpoints/breakpoint-sportbild-md.json +686 -0
- package/dist/json/semantic/sportbild/breakpoints/breakpoint-sportbild-sm.json +686 -0
- package/dist/json/semantic/sportbild/breakpoints/breakpoint-sportbild-xs.json +686 -0
- package/dist/json/semantic/sportbild/color/color-sportbild-dark.json +307 -0
- package/dist/json/semantic/sportbild/color/color-sportbild-light.json +307 -0
- package/dist/manifest.json +183 -0
- package/dist/scss/base/index.scss +8 -0
- package/dist/scss/base/primitive-color-value.scss +97 -0
- package/dist/scss/base/primitive-font-value.scss +46 -0
- package/dist/scss/base/primitive-size-value.scss +52 -0
- package/dist/scss/base/primitive-space-value.scss +28 -0
- package/dist/scss/density/density-compact.scss +11 -0
- package/dist/scss/density/density-default.scss +11 -0
- package/dist/scss/density/density-spacious.scss +11 -0
- package/dist/scss/density/index.scss +7 -0
- package/dist/scss/mapping/brand-advertorial.scss +274 -0
- package/dist/scss/mapping/brand-bild.scss +274 -0
- package/dist/scss/mapping/brand-color-bild.scss +71 -0
- package/dist/scss/mapping/brand-color-sportbild.scss +71 -0
- package/dist/scss/mapping/brand-sportbild.scss +274 -0
- package/dist/scss/mapping/index.scss +9 -0
- package/dist/scss/semantic/advertorial/breakpoints/breakpoint-advertorial-lg.scss +475 -0
- package/dist/scss/semantic/advertorial/breakpoints/breakpoint-advertorial-md.scss +475 -0
- package/dist/scss/semantic/advertorial/breakpoints/breakpoint-advertorial-sm.scss +475 -0
- package/dist/scss/semantic/advertorial/breakpoints/breakpoint-advertorial-xs.scss +475 -0
- package/dist/scss/semantic/advertorial/breakpoints/index.scss +8 -0
- package/dist/scss/semantic/advertorial/color/color-advertorial-dark.scss +318 -0
- package/dist/scss/semantic/advertorial/color/color-advertorial-light.scss +318 -0
- package/dist/scss/semantic/advertorial/color/index.scss +6 -0
- package/dist/scss/semantic/bild/breakpoints/breakpoint-bild-lg.scss +475 -0
- package/dist/scss/semantic/bild/breakpoints/breakpoint-bild-md.scss +475 -0
- package/dist/scss/semantic/bild/breakpoints/breakpoint-bild-sm.scss +475 -0
- package/dist/scss/semantic/bild/breakpoints/breakpoint-bild-xs.scss +475 -0
- package/dist/scss/semantic/bild/breakpoints/index.scss +8 -0
- package/dist/scss/semantic/bild/color/color-bild-dark.scss +318 -0
- package/dist/scss/semantic/bild/color/color-bild-light.scss +318 -0
- package/dist/scss/semantic/bild/color/index.scss +6 -0
- package/dist/scss/semantic/sportbild/breakpoints/breakpoint-sportbild-lg.scss +475 -0
- package/dist/scss/semantic/sportbild/breakpoints/breakpoint-sportbild-md.scss +475 -0
- package/dist/scss/semantic/sportbild/breakpoints/breakpoint-sportbild-sm.scss +475 -0
- package/dist/scss/semantic/sportbild/breakpoints/breakpoint-sportbild-xs.scss +475 -0
- package/dist/scss/semantic/sportbild/breakpoints/index.scss +8 -0
- package/dist/scss/semantic/sportbild/color/color-sportbild-dark.scss +318 -0
- package/dist/scss/semantic/sportbild/color/color-sportbild-light.scss +318 -0
- package/dist/scss/semantic/sportbild/color/index.scss +6 -0
- package/package.json +62 -0
package/README.md
ADDED
|
@@ -0,0 +1,767 @@
|
|
|
1
|
+
# ๐จ BILD Design System - Token Pipeline
|
|
2
|
+
|
|
3
|
+
A comprehensive token transformation pipeline based on **Style Dictionary v4** for the BILD Design System. This pipeline transforms Figma design tokens (exported via VariableVisualizer Plugin) into consumable formats across multiple platforms, brands, and modes.
|
|
4
|
+
|
|
5
|
+
## ๐ Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Overview](#overview)
|
|
8
|
+
- [Features](#features)
|
|
9
|
+
- [Token Architecture](#token-architecture)
|
|
10
|
+
- [Installation](#installation)
|
|
11
|
+
- [Usage](#usage)
|
|
12
|
+
- [Output Structure](#output-structure)
|
|
13
|
+
- [Configuration](#configuration)
|
|
14
|
+
- [CI/CD Integration](#cicd-integration)
|
|
15
|
+
- [Troubleshooting](#troubleshooting)
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## ๐ฏ Overview
|
|
20
|
+
|
|
21
|
+
This token pipeline processes the multi-layer, multi-brand architecture of the BILD Design System with full support for design token aliases, modes, and brand-specific variations.
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
Figma Tokens (JSON)
|
|
25
|
+
โ
|
|
26
|
+
Preprocessing (scripts/preprocess-figma-tokens.js)
|
|
27
|
+
โข Alias resolution with brand awareness
|
|
28
|
+
โข Mode ID mapping
|
|
29
|
+
โข Collection ID-based filtering
|
|
30
|
+
โ
|
|
31
|
+
Style Dictionary v4 (scripts/build-tokens.js)
|
|
32
|
+
โข Custom transforms
|
|
33
|
+
โข Multi-platform output
|
|
34
|
+
โข Brand-specific builds
|
|
35
|
+
โ
|
|
36
|
+
Output Files (CSS, SCSS, JS, JSON)
|
|
37
|
+
โข Platform-first organization
|
|
38
|
+
โข Brand-specific semantic tokens
|
|
39
|
+
โข Zero warnings, fully resolved
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## โจ Features
|
|
45
|
+
|
|
46
|
+
### Pipeline Features
|
|
47
|
+
|
|
48
|
+
โ
**Stable Collection IDs**: Uses Figma Collection IDs instead of names for robustness against renaming
|
|
49
|
+
โ
**Zero Warnings**: All false positives eliminated - handles `0`, `false`, `""` values correctly
|
|
50
|
+
โ
**Brand-Aware Alias Resolution**: Cross-collection references resolve correctly per brand
|
|
51
|
+
โ
**Multi-Layer Support**: Base โ Mapping โ Density โ Semantic
|
|
52
|
+
โ
**Multi-Brand**: BILD, SportBILD, Advertorial
|
|
53
|
+
โ
**Multi-Mode**: Light/Dark, Responsive Breakpoints, Density variations
|
|
54
|
+
โ
**Multiple Output Formats**: CSS, SCSS, JavaScript, JSON
|
|
55
|
+
โ
**Hot Reload**: Watch mode for development
|
|
56
|
+
|
|
57
|
+
### Architecture Features
|
|
58
|
+
|
|
59
|
+
โ
**Platform-First Organization**: `dist/css/`, `dist/scss/`, `dist/js/`, `dist/json/`
|
|
60
|
+
โ
**Brand-Specific Semantic Layer**: Tokens organized by brand, then category
|
|
61
|
+
โ
**Recursive Index Files**: Automatic index generation at each level
|
|
62
|
+
โ
**Gitignored Dist**: Build artifacts excluded from version control
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## ๐ฆ Installation
|
|
67
|
+
|
|
68
|
+
### As NPM Package (Recommended)
|
|
69
|
+
|
|
70
|
+
This package is published to **GitHub Packages** as `@uxwizard25/design-system-tokens`.
|
|
71
|
+
|
|
72
|
+
#### 1. Configure NPM Registry
|
|
73
|
+
|
|
74
|
+
Create or edit `.npmrc` in your project root:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
@uxwizard25:registry=https://npm.pkg.github.com
|
|
78
|
+
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
#### 2. Authenticate with GitHub
|
|
82
|
+
|
|
83
|
+
Create a Personal Access Token (PAT):
|
|
84
|
+
|
|
85
|
+
1. Go to: https://github.com/settings/tokens
|
|
86
|
+
2. Click **"Generate new token (classic)"**
|
|
87
|
+
3. Name: `npm-packages-read`
|
|
88
|
+
4. Scopes: Select `read:packages`
|
|
89
|
+
5. Click **"Generate token"**
|
|
90
|
+
6. Copy the token
|
|
91
|
+
|
|
92
|
+
Add the token to your `.npmrc`:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
//npm.pkg.github.com/:_authToken=ghp_YOUR_TOKEN_HERE
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Or use an environment variable:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
export GITHUB_TOKEN="ghp_YOUR_TOKEN_HERE"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
#### 3. Install Package
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Latest version
|
|
108
|
+
npm install @uxwizard25/design-system-tokens
|
|
109
|
+
|
|
110
|
+
# Specific version
|
|
111
|
+
npm install @uxwizard25/design-system-tokens@1.2.3
|
|
112
|
+
|
|
113
|
+
# As dev dependency
|
|
114
|
+
npm install --save-dev @uxwizard25/design-system-tokens
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
#### 4. Use in Your Project
|
|
118
|
+
|
|
119
|
+
**CSS:**
|
|
120
|
+
```css
|
|
121
|
+
/* Import in your main CSS file */
|
|
122
|
+
@import '@uxwizard25/design-system-tokens/css/semantic/bild/color/color-bild-light.css';
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**SCSS:**
|
|
126
|
+
```scss
|
|
127
|
+
// Import in your SCSS file
|
|
128
|
+
@import '@uxwizard25/design-system-tokens/scss/semantic/bild/color/color-bild-light';
|
|
129
|
+
|
|
130
|
+
.my-button {
|
|
131
|
+
background-color: var(--color-brand-primary);
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**JavaScript/TypeScript:**
|
|
136
|
+
```javascript
|
|
137
|
+
// Import tokens as JS module
|
|
138
|
+
import tokens from '@uxwizard25/design-system-tokens/json/semantic/bild/color/color-bild-light.json';
|
|
139
|
+
|
|
140
|
+
console.log(tokens.color.brand.primary); // "#de0000"
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Webpack/Vite:**
|
|
144
|
+
```javascript
|
|
145
|
+
// In your main.js or main.ts
|
|
146
|
+
import '@uxwizard25/design-system-tokens/css/semantic/bild/color/color-bild-light.css';
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Local Development
|
|
150
|
+
|
|
151
|
+
If you want to develop the token pipeline itself:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
# Clone repository
|
|
155
|
+
git clone https://github.com/UXWizard25/vv-token-test-v3.git
|
|
156
|
+
cd vv-token-test-v3
|
|
157
|
+
|
|
158
|
+
# Install dependencies
|
|
159
|
+
npm install
|
|
160
|
+
|
|
161
|
+
# Build tokens
|
|
162
|
+
npm run build
|
|
163
|
+
|
|
164
|
+
# Watch mode (auto-rebuild on changes)
|
|
165
|
+
npm run watch
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## ๐๏ธ Token Architecture
|
|
171
|
+
|
|
172
|
+
### Layer Structure
|
|
173
|
+
|
|
174
|
+
The Design System is organized in four layers:
|
|
175
|
+
|
|
176
|
+
#### 1๏ธโฃ **Base Layer** - Primitive Tokens
|
|
177
|
+
|
|
178
|
+
Foundation tokens without modes (only "Value" mode).
|
|
179
|
+
|
|
180
|
+
- **`_ColorPrimitive`**: Base color palette (includes opacity values)
|
|
181
|
+
- **`_SpacePrimitive`**: Base spacing scale
|
|
182
|
+
- **`_SizePrimitive`**: Base size scale
|
|
183
|
+
- **`_FontPrimitive`**: Base typography
|
|
184
|
+
|
|
185
|
+
**Collections:**
|
|
186
|
+
- `VariableCollectionId:539:2238` โ `_ColorPrimitive`
|
|
187
|
+
- `VariableCollectionId:2726:12077` โ `_SpacePrimitive`
|
|
188
|
+
- `VariableCollectionId:4072:1817` โ `_SizePrimitive`
|
|
189
|
+
- `VariableCollectionId:470:1450` โ `_FontPrimitive`
|
|
190
|
+
|
|
191
|
+
**Output:**
|
|
192
|
+
```
|
|
193
|
+
dist/css/base/
|
|
194
|
+
โโโ primitive-color-value.css
|
|
195
|
+
โโโ primitive-space-value.css
|
|
196
|
+
โโโ primitive-size-value.css
|
|
197
|
+
โโโ primitive-font-value.css
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
#### 2๏ธโฃ **Mapping Layer** - Brand-Specific Tokens
|
|
201
|
+
|
|
202
|
+
Maps primitives to brand identities.
|
|
203
|
+
|
|
204
|
+
- **`BrandTokenMapping`**: Modes: BILD, SportBILD, Advertorial
|
|
205
|
+
- **`BrandColorMapping`**: Modes: BILD, SportBILD
|
|
206
|
+
|
|
207
|
+
**Collections:**
|
|
208
|
+
- `VariableCollectionId:18038:10593` โ `BrandTokenMapping`
|
|
209
|
+
- `VariableCollectionId:18212:14495` โ `BrandColorMapping`
|
|
210
|
+
|
|
211
|
+
**Output:**
|
|
212
|
+
```
|
|
213
|
+
dist/css/mapping/
|
|
214
|
+
โโโ brand-bild.css
|
|
215
|
+
โโโ brand-sportbild.css
|
|
216
|
+
โโโ brand-advertorial.css
|
|
217
|
+
โโโ brand-color-bild.css
|
|
218
|
+
โโโ brand-color-sportbild.css
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
#### 3๏ธโฃ **Density Layer** - Density Variations
|
|
222
|
+
|
|
223
|
+
Intermediate layer for UI density levels.
|
|
224
|
+
|
|
225
|
+
- **`Density`**: Modes: compact, default, spacious
|
|
226
|
+
|
|
227
|
+
**Collections:**
|
|
228
|
+
- `VariableCollectionId:5695:5841` โ `Density`
|
|
229
|
+
|
|
230
|
+
**Output:**
|
|
231
|
+
```
|
|
232
|
+
dist/css/density/
|
|
233
|
+
โโโ density-compact.css
|
|
234
|
+
โโโ density-default.css
|
|
235
|
+
โโโ density-spacious.css
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
#### 4๏ธโฃ **Semantic Layer** - Context-Specific Tokens โญ
|
|
239
|
+
|
|
240
|
+
**Brand-specific consumable layer** for applications. Each brand gets its own directory with resolved values.
|
|
241
|
+
|
|
242
|
+
- **`ColorMode`**: Modes: Light, Dark (brand-specific)
|
|
243
|
+
- **`BreakpointMode`**: Modes: XS, SM, MD, LG (brand-specific)
|
|
244
|
+
|
|
245
|
+
**Collections:**
|
|
246
|
+
- `VariableCollectionId:588:1979` โ `ColorMode`
|
|
247
|
+
- `VariableCollectionId:7017:25696` โ `BreakpointMode`
|
|
248
|
+
|
|
249
|
+
**Output:**
|
|
250
|
+
```
|
|
251
|
+
dist/css/semantic/
|
|
252
|
+
โโโ bild/
|
|
253
|
+
โ โโโ color/
|
|
254
|
+
โ โ โโโ color-bild-light.css # BILD brand with #de0000
|
|
255
|
+
โ โ โโโ color-bild-dark.css
|
|
256
|
+
โ โโโ breakpoints/
|
|
257
|
+
โ โโโ breakpoint-bild-xs.css
|
|
258
|
+
โ โโโ breakpoint-bild-sm.css
|
|
259
|
+
โ โโโ breakpoint-bild-md.css
|
|
260
|
+
โ โโโ breakpoint-bild-lg.css
|
|
261
|
+
โโโ sportbild/
|
|
262
|
+
โ โโโ color/
|
|
263
|
+
โ โ โโโ color-sportbild-light.css # SportBILD brand with #0a264f
|
|
264
|
+
โ โ โโโ color-sportbild-dark.css
|
|
265
|
+
โ โโโ breakpoints/
|
|
266
|
+
โ โโโ ...
|
|
267
|
+
โโโ advertorial/
|
|
268
|
+
โโโ color/
|
|
269
|
+
โ โโโ color-advertorial-light.css
|
|
270
|
+
โ โโโ color-advertorial-dark.css
|
|
271
|
+
โโโ breakpoints/
|
|
272
|
+
โโโ ...
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
**Key Feature:** Each brand directory contains fully resolved token values specific to that brand. Cross-collection aliases (e.g., from `ColorMode` โ `BrandColorMapping`) are resolved correctly per brand during preprocessing.
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## ๐ฆ Installation
|
|
280
|
+
|
|
281
|
+
### Prerequisites
|
|
282
|
+
|
|
283
|
+
- Node.js >= 16.x
|
|
284
|
+
- npm >= 8.x
|
|
285
|
+
|
|
286
|
+
### Setup
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
# Install dependencies
|
|
290
|
+
npm install
|
|
291
|
+
|
|
292
|
+
# Or with pnpm/yarn
|
|
293
|
+
pnpm install
|
|
294
|
+
yarn install
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## ๐ Usage
|
|
300
|
+
|
|
301
|
+
### Full Build
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
# 1. Preprocessing: Figma JSON โ Intermediate tokens
|
|
305
|
+
npm run preprocess
|
|
306
|
+
|
|
307
|
+
# 2. Build: Tokens โ Output files
|
|
308
|
+
npm run build:tokens
|
|
309
|
+
|
|
310
|
+
# Or both in one step:
|
|
311
|
+
npm run build
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
**Build Results:**
|
|
315
|
+
- โ
30/30 builds successful
|
|
316
|
+
- โ
0 warnings
|
|
317
|
+
- โ
All aliases resolved correctly
|
|
318
|
+
- โ
Brand-specific values verified
|
|
319
|
+
|
|
320
|
+
### Watch Mode (Development)
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
# Auto-rebuild on changes
|
|
324
|
+
npm run watch
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### Clean Build
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
# Remove all generated files
|
|
331
|
+
npm run clean
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
---
|
|
335
|
+
|
|
336
|
+
## ๐ Output Structure
|
|
337
|
+
|
|
338
|
+
### Platform-First Organization
|
|
339
|
+
|
|
340
|
+
```
|
|
341
|
+
dist/
|
|
342
|
+
โโโ manifest.json # Manifest of all generated files
|
|
343
|
+
โ
|
|
344
|
+
โโโ css/ # CSS Custom Properties
|
|
345
|
+
โ โโโ base/
|
|
346
|
+
โ โ โโโ index.css # Aggregates all base tokens
|
|
347
|
+
โ โ โโโ primitive-color-value.css
|
|
348
|
+
โ โ โโโ primitive-color-value-global.css
|
|
349
|
+
โ โ โโโ ...
|
|
350
|
+
โ โโโ mapping/
|
|
351
|
+
โ โ โโโ index.css
|
|
352
|
+
โ โ โโโ brand-bild.css
|
|
353
|
+
โ โ โโโ ...
|
|
354
|
+
โ โโโ density/
|
|
355
|
+
โ โ โโโ index.css
|
|
356
|
+
โ โ โโโ ...
|
|
357
|
+
โ โโโ semantic/
|
|
358
|
+
โ โโโ bild/
|
|
359
|
+
โ โ โโโ color/
|
|
360
|
+
โ โ โ โโโ index.css
|
|
361
|
+
โ โ โ โโโ color-bild-light.css
|
|
362
|
+
โ โ โ โโโ color-bild-light-global.css
|
|
363
|
+
โ โ โ โโโ color-bild-dark.css
|
|
364
|
+
โ โ โโโ breakpoints/
|
|
365
|
+
โ โ โโโ index.css
|
|
366
|
+
โ โ โโโ breakpoint-bild-xs.css
|
|
367
|
+
โ โ โโโ ...
|
|
368
|
+
โ โโโ sportbild/
|
|
369
|
+
โ โ โโโ ...
|
|
370
|
+
โ โโโ advertorial/
|
|
371
|
+
โ โโโ ...
|
|
372
|
+
โ
|
|
373
|
+
โโโ scss/ # SCSS Variables (same structure)
|
|
374
|
+
โโโ js/ # JavaScript ES6 Modules (same structure)
|
|
375
|
+
โโโ json/ # Structured JSON (same structure)
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
### File Format Variants
|
|
379
|
+
|
|
380
|
+
Each token set generates multiple variants:
|
|
381
|
+
|
|
382
|
+
| Format | Usage | Selector | Example |
|
|
383
|
+
|--------|-------|----------|---------|
|
|
384
|
+
| `.css` | Data attribute scoped | `[data-color="light"]` | Scoped contexts |
|
|
385
|
+
| `-global.css` | Root scoped | `:root` | Global application |
|
|
386
|
+
| `.scss` | SCSS variables | `$token-name` | Sass preprocessing |
|
|
387
|
+
| `.js` | ES6 module | `import tokens` | JavaScript apps |
|
|
388
|
+
| `.json` | Structured data | JSON | API/tooling |
|
|
389
|
+
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
## ๐จ Usage in Projects
|
|
393
|
+
|
|
394
|
+
### CSS
|
|
395
|
+
|
|
396
|
+
```css
|
|
397
|
+
/* Import brand-specific tokens */
|
|
398
|
+
@import '@bild-ds/tokens/dist/css/semantic/bild/color/color-bild-light.css';
|
|
399
|
+
@import '@bild-ds/tokens/dist/css/semantic/bild/breakpoints/breakpoint-bild-md.css';
|
|
400
|
+
|
|
401
|
+
/* Or use index files */
|
|
402
|
+
@import '@bild-ds/tokens/dist/css/semantic/bild/color/index.css';
|
|
403
|
+
|
|
404
|
+
/* Usage with data attributes */
|
|
405
|
+
[data-color="light"] {
|
|
406
|
+
background: var(--semantic-core-core-color-primary); /* #de0000 for BILD */
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/* Or with global variant */
|
|
410
|
+
@import '@bild-ds/tokens/dist/css/semantic/bild/color/color-bild-light-global.css';
|
|
411
|
+
|
|
412
|
+
.button {
|
|
413
|
+
background: var(--semantic-core-core-color-primary);
|
|
414
|
+
}
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
### SCSS
|
|
418
|
+
|
|
419
|
+
```scss
|
|
420
|
+
// Import brand-specific tokens
|
|
421
|
+
@import '@bild-ds/tokens/dist/scss/semantic/bild/color/color-bild-light.scss';
|
|
422
|
+
|
|
423
|
+
// Usage
|
|
424
|
+
.button {
|
|
425
|
+
background-color: $semantic-core-core-color-primary; // #de0000 for BILD
|
|
426
|
+
padding: $semantic-spacing-spacing-md;
|
|
427
|
+
}
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
### JavaScript/TypeScript
|
|
431
|
+
|
|
432
|
+
```javascript
|
|
433
|
+
// Import brand-specific tokens
|
|
434
|
+
import bildColorLight from '@bild-ds/tokens/dist/js/semantic/bild/color/color-bild-light.js';
|
|
435
|
+
import sportbildColorLight from '@bild-ds/tokens/dist/js/semantic/sportbild/color/color-sportbild-light.js';
|
|
436
|
+
|
|
437
|
+
// BILD brand
|
|
438
|
+
console.log(bildColorLight['semantic-core-core-color-primary']); // "#de0000"
|
|
439
|
+
|
|
440
|
+
// SportBILD brand
|
|
441
|
+
console.log(sportbildColorLight['semantic-core-core-color-primary']); // "#0a264f"
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
### React/Styled Components
|
|
445
|
+
|
|
446
|
+
```jsx
|
|
447
|
+
import bildTokens from '@bild-ds/tokens/dist/js/semantic/bild/color/color-bild-light.js';
|
|
448
|
+
|
|
449
|
+
const Button = styled.button`
|
|
450
|
+
background-color: ${bildTokens['semantic-core-core-color-primary']};
|
|
451
|
+
color: ${bildTokens['semantic-core-core-fg-on-primary']};
|
|
452
|
+
`;
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
---
|
|
456
|
+
|
|
457
|
+
## โ๏ธ Configuration
|
|
458
|
+
|
|
459
|
+
### Collection Configuration
|
|
460
|
+
|
|
461
|
+
Located in `scripts/build-tokens.js`:
|
|
462
|
+
|
|
463
|
+
```javascript
|
|
464
|
+
const COLLECTION_CONFIG = {
|
|
465
|
+
'colormode': {
|
|
466
|
+
layer: 'semantic',
|
|
467
|
+
category: 'color',
|
|
468
|
+
modes: ['light', 'dark'],
|
|
469
|
+
outputPrefix: 'color',
|
|
470
|
+
figmaCollectionId: 'VariableCollectionId:588:1979', // Stable ID
|
|
471
|
+
figmaCollectionName: 'ColorMode', // For logging only
|
|
472
|
+
brandSpecific: true,
|
|
473
|
+
brands: ['bild', 'sportbild', 'advertorial']
|
|
474
|
+
},
|
|
475
|
+
// ... more collections
|
|
476
|
+
};
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
**Key Points:**
|
|
480
|
+
- Uses **stable Collection IDs** from Figma (robust against renaming)
|
|
481
|
+
- `brandSpecific: true` generates separate files per brand
|
|
482
|
+
- `modeMapping` can transform mode names (e.g., `xs-320px` โ `xs`)
|
|
483
|
+
|
|
484
|
+
### Brand-Specific Collections
|
|
485
|
+
|
|
486
|
+
Located in `scripts/preprocess-figma-tokens.js`:
|
|
487
|
+
|
|
488
|
+
```javascript
|
|
489
|
+
const BRAND_SPECIFIC_COLLECTIONS = {
|
|
490
|
+
'VariableCollectionId:588:1979': { // ColorMode
|
|
491
|
+
collectionName: 'ColorMode',
|
|
492
|
+
brandSpecific: true,
|
|
493
|
+
brands: ['bild', 'sportbild', 'advertorial'],
|
|
494
|
+
brandCollectionIds: [
|
|
495
|
+
'VariableCollectionId:18038:10593', // BrandTokenMapping
|
|
496
|
+
'VariableCollectionId:18212:14495' // BrandColorMapping
|
|
497
|
+
]
|
|
498
|
+
}
|
|
499
|
+
};
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
**How It Works:**
|
|
503
|
+
1. During preprocessing, ColorMode tokens that reference BrandColorMapping
|
|
504
|
+
2. Are resolved **per brand** using the correct mode ID
|
|
505
|
+
3. Generate separate output files: `light-bild.json`, `light-sportbild.json`, etc.
|
|
506
|
+
|
|
507
|
+
### Style Dictionary Transforms
|
|
508
|
+
|
|
509
|
+
Custom transforms in `build-config/style-dictionary.config.js`:
|
|
510
|
+
|
|
511
|
+
```javascript
|
|
512
|
+
StyleDictionary.registerTransform({
|
|
513
|
+
name: 'attribute/cti',
|
|
514
|
+
type: 'attribute',
|
|
515
|
+
transformer: (token) => {
|
|
516
|
+
// Custom transformation logic
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
---
|
|
522
|
+
|
|
523
|
+
## ๐ CI/CD Integration
|
|
524
|
+
|
|
525
|
+
### GitHub Actions Workflow
|
|
526
|
+
|
|
527
|
+
Located in `.github/workflows/build-tokens.yml`
|
|
528
|
+
|
|
529
|
+
**Triggers:**
|
|
530
|
+
- Push to `main`, `develop`, or `claude/**` branches
|
|
531
|
+
- Changes in `src/design-tokens/`
|
|
532
|
+
- Changes in `scripts/` or `build-config/`
|
|
533
|
+
- Manual workflow dispatch
|
|
534
|
+
|
|
535
|
+
**Build Steps:**
|
|
536
|
+
1. Checkout repository
|
|
537
|
+
2. Setup Node.js
|
|
538
|
+
3. Install dependencies
|
|
539
|
+
4. Run preprocessing
|
|
540
|
+
5. Run build
|
|
541
|
+
6. Upload artifacts
|
|
542
|
+
|
|
543
|
+
**Artifacts:**
|
|
544
|
+
- Name: `design-tokens-{commit-sha}`
|
|
545
|
+
- Retention: 30 days
|
|
546
|
+
- Contains: All generated files
|
|
547
|
+
|
|
548
|
+
### Manual Workflow Dispatch
|
|
549
|
+
|
|
550
|
+
**Via GitHub UI:**
|
|
551
|
+
1. Go to **Actions** tab
|
|
552
|
+
2. Select **"Build Design Tokens"**
|
|
553
|
+
3. Click **"Run workflow"**
|
|
554
|
+
|
|
555
|
+
**Via GitHub CLI:**
|
|
556
|
+
```bash
|
|
557
|
+
gh workflow run build-tokens.yml
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
---
|
|
561
|
+
|
|
562
|
+
## ๐ง Development
|
|
563
|
+
|
|
564
|
+
### Project Structure
|
|
565
|
+
|
|
566
|
+
```
|
|
567
|
+
.
|
|
568
|
+
โโโ src/
|
|
569
|
+
โ โโโ design-tokens/
|
|
570
|
+
โ โโโ BILD Design System-variables-full.json # Figma export
|
|
571
|
+
โ
|
|
572
|
+
โโโ scripts/
|
|
573
|
+
โ โโโ preprocess-figma-tokens.js # Preprocessing
|
|
574
|
+
โ โ โข Alias resolution with brand awareness
|
|
575
|
+
โ โ โข Collection ID mapping
|
|
576
|
+
โ โ โข Mode ID mapping
|
|
577
|
+
โ โ โข Zero false positives (handles 0, false, "")
|
|
578
|
+
โ โโโ build-tokens.js # Build orchestration
|
|
579
|
+
โ โข Collection configuration
|
|
580
|
+
โ โข Brand-specific builds
|
|
581
|
+
โ โข Index file generation
|
|
582
|
+
โ
|
|
583
|
+
โโโ build-config/
|
|
584
|
+
โ โโโ style-dictionary.config.js # Custom transforms & formats
|
|
585
|
+
โ
|
|
586
|
+
โโโ tokens/ # Generated (gitignored)
|
|
587
|
+
โ โโโ colormode/
|
|
588
|
+
โ โ โโโ light-bild.json # Brand-specific
|
|
589
|
+
โ โ โโโ light-sportbild.json
|
|
590
|
+
โ โ โโโ ...
|
|
591
|
+
โ โโโ ...
|
|
592
|
+
โ
|
|
593
|
+
โโโ dist/ # Generated (gitignored)
|
|
594
|
+
โ โโโ css/
|
|
595
|
+
โ โโโ scss/
|
|
596
|
+
โ โโโ js/
|
|
597
|
+
โ โโโ json/
|
|
598
|
+
โ
|
|
599
|
+
โโโ README.md
|
|
600
|
+
```
|
|
601
|
+
|
|
602
|
+
### Development Workflow
|
|
603
|
+
|
|
604
|
+
1. **Export from Figma**
|
|
605
|
+
- Use VariableVisualizer Plugin
|
|
606
|
+
- Export as `BILD Design System-variables-full.json`
|
|
607
|
+
|
|
608
|
+
2. **Place JSON**
|
|
609
|
+
- Save to `src/design-tokens/`
|
|
610
|
+
|
|
611
|
+
3. **Preprocess**
|
|
612
|
+
```bash
|
|
613
|
+
npm run preprocess
|
|
614
|
+
```
|
|
615
|
+
- Resolves aliases per brand
|
|
616
|
+
- Creates intermediate token files
|
|
617
|
+
- **0 warnings expected**
|
|
618
|
+
|
|
619
|
+
4. **Build**
|
|
620
|
+
```bash
|
|
621
|
+
npm run build:tokens
|
|
622
|
+
```
|
|
623
|
+
- Transforms to all formats
|
|
624
|
+
- **30/30 builds expected**
|
|
625
|
+
|
|
626
|
+
5. **Verify**
|
|
627
|
+
```bash
|
|
628
|
+
# Check brand-specific values
|
|
629
|
+
grep "core-color-primary" dist/css/semantic/*/color/*-light.css
|
|
630
|
+
|
|
631
|
+
# Expected:
|
|
632
|
+
# bild: #de0000 (BILD red)
|
|
633
|
+
# sportbild: #0a264f (SportBILD dark blue)
|
|
634
|
+
```
|
|
635
|
+
|
|
636
|
+
---
|
|
637
|
+
|
|
638
|
+
## ๐งช Testing
|
|
639
|
+
|
|
640
|
+
### Build Verification
|
|
641
|
+
|
|
642
|
+
```bash
|
|
643
|
+
# Run full build
|
|
644
|
+
npm run build
|
|
645
|
+
|
|
646
|
+
# Check build statistics
|
|
647
|
+
# Expected: 30/30 builds successful, 0 warnings
|
|
648
|
+
|
|
649
|
+
# Verify output structure
|
|
650
|
+
ls -R dist/css/semantic/
|
|
651
|
+
|
|
652
|
+
# Check brand-specific values
|
|
653
|
+
cat dist/css/semantic/bild/color/color-bild-light.css | grep "core-color-primary"
|
|
654
|
+
cat dist/css/semantic/sportbild/color/color-sportbild-light.css | grep "core-color-primary"
|
|
655
|
+
```
|
|
656
|
+
|
|
657
|
+
### Alias Resolution Check
|
|
658
|
+
|
|
659
|
+
```bash
|
|
660
|
+
# Check for unresolved aliases
|
|
661
|
+
grep -r "UNRESOLVED" tokens/
|
|
662
|
+
|
|
663
|
+
# Expected: No results (all aliases should be resolved)
|
|
664
|
+
```
|
|
665
|
+
|
|
666
|
+
---
|
|
667
|
+
|
|
668
|
+
## ๐ Troubleshooting
|
|
669
|
+
|
|
670
|
+
### Build Warnings
|
|
671
|
+
|
|
672
|
+
**Problem:** Warnings about missing values or circular references
|
|
673
|
+
|
|
674
|
+
**Solution:** This has been fixed! The pipeline now:
|
|
675
|
+
- Uses `value === undefined || value === null` checks (handles `0`, `false`, `""` correctly)
|
|
676
|
+
- Uses Variable IDs for circular reference detection (not names)
|
|
677
|
+
- Resolves cross-collection aliases correctly per brand
|
|
678
|
+
|
|
679
|
+
**Expected:** 0 warnings in both preprocessing and build
|
|
680
|
+
|
|
681
|
+
### Brand Values Incorrect
|
|
682
|
+
|
|
683
|
+
**Problem:** All brands have the same color values
|
|
684
|
+
|
|
685
|
+
**Solution:** This has been fixed! The pipeline now:
|
|
686
|
+
- Maps brand names to Mode IDs in brand collections
|
|
687
|
+
- Resolves aliases using the correct brand-specific mode
|
|
688
|
+
- Generates separate token files per brand
|
|
689
|
+
|
|
690
|
+
**Verify:**
|
|
691
|
+
```bash
|
|
692
|
+
# BILD should have #de0000
|
|
693
|
+
grep "core-color-primary" dist/css/semantic/bild/color/color-bild-light.css
|
|
694
|
+
|
|
695
|
+
# SportBILD should have #0a264f
|
|
696
|
+
grep "core-color-primary" dist/css/semantic/sportbild/color/color-sportbild-light.css
|
|
697
|
+
```
|
|
698
|
+
|
|
699
|
+
### Merge Conflicts with dist/
|
|
700
|
+
|
|
701
|
+
**Problem:** Git conflicts in `dist/` folder
|
|
702
|
+
|
|
703
|
+
**Solution:** This has been fixed! `dist/` is now:
|
|
704
|
+
- Fully gitignored
|
|
705
|
+
- Generated locally or in CI/CD
|
|
706
|
+
- Never committed to the repository
|
|
707
|
+
|
|
708
|
+
### Collection Renamed in Figma
|
|
709
|
+
|
|
710
|
+
**Problem:** Pipeline breaks after renaming collections in Figma
|
|
711
|
+
|
|
712
|
+
**Solution:** This has been fixed! The pipeline now uses:
|
|
713
|
+
- **Stable Collection IDs** instead of names
|
|
714
|
+
- IDs never change even if you rename collections
|
|
715
|
+
- Names are kept only for logging purposes
|
|
716
|
+
|
|
717
|
+
---
|
|
718
|
+
|
|
719
|
+
## ๐ Build Statistics
|
|
720
|
+
|
|
721
|
+
**Current Performance:**
|
|
722
|
+
- โ
30/30 builds successful
|
|
723
|
+
- โ
0 warnings
|
|
724
|
+
- โ
0 errors
|
|
725
|
+
- โ
~3s preprocessing
|
|
726
|
+
- โ
~5s build
|
|
727
|
+
- โ
178 token files generated
|
|
728
|
+
- โ
All cross-collection aliases resolved
|
|
729
|
+
- โ
Brand-specific values verified
|
|
730
|
+
|
|
731
|
+
---
|
|
732
|
+
|
|
733
|
+
## ๐ Resources
|
|
734
|
+
|
|
735
|
+
- [Style Dictionary v4 Documentation](https://styledictionary.com/)
|
|
736
|
+
- [Figma Variables API](https://www.figma.com/plugin-docs/api/properties/figma-variables/)
|
|
737
|
+
- [Design Tokens Community Group](https://design-tokens.github.io/community-group/)
|
|
738
|
+
- [VariableVisualizer Plugin](https://www.figma.com/community/plugin/1245712093276493432)
|
|
739
|
+
|
|
740
|
+
---
|
|
741
|
+
|
|
742
|
+
## ๐ Changelog
|
|
743
|
+
|
|
744
|
+
### Latest (Current)
|
|
745
|
+
|
|
746
|
+
**โจ Features:**
|
|
747
|
+
- Brand-specific semantic layer structure (`dist/css/semantic/{brand}/{category}/`)
|
|
748
|
+
- Stable Collection ID usage (robust against Figma renaming)
|
|
749
|
+
- Zero false positive warnings (correct handling of falsy values)
|
|
750
|
+
- Cross-collection brand-aware alias resolution
|
|
751
|
+
- Recursive index file generation
|
|
752
|
+
|
|
753
|
+
**๐ Bug Fixes:**
|
|
754
|
+
- Fixed falsy value detection (`0`, `false`, `""` now handled correctly)
|
|
755
|
+
- Fixed false positive circular reference warnings
|
|
756
|
+
- Fixed cross-collection alias resolution for brand-specific tokens
|
|
757
|
+
- Removed `dist/` from git tracking (now fully gitignored)
|
|
758
|
+
|
|
759
|
+
**โก Performance:**
|
|
760
|
+
- 30/30 builds successful
|
|
761
|
+
- 0 warnings in preprocessing
|
|
762
|
+
- 0 warnings in build
|
|
763
|
+
- All aliases fully resolved
|
|
764
|
+
|
|
765
|
+
---
|
|
766
|
+
|
|
767
|
+
**Built with โค๏ธ for the BILD Design System**
|