@motion-proto/live-tokens 0.79.0 → 0.80.0
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/.claude/skills/live-tokens-check-compliance/SKILL.md +12 -30
- package/CHANGELOG.md +40 -0
- package/README.md +4 -4
- package/bin/check-component.mjs +2 -0
- package/bin/check-page.mjs +2 -0
- package/bin/cli.mjs +38 -7
- package/bin/lib/buildChecks.mjs +32 -0
- package/bin/migrate-build-script.mjs +66 -0
- package/bin/migrate.mjs +5 -0
- package/bin/rules/tokens.mjs +64 -1
- package/dist-plugin/index.cjs +38 -4
- package/dist-plugin/index.d.cts +1 -0
- package/dist-plugin/index.d.ts +1 -0
- package/dist-plugin/index.js +79 -46
- package/package.json +1 -1
- package/src/editor/skill-atlas/skillSources.generated.ts +1 -1
- package/src/editor/skill-atlas/trees/check-compliance.ts +25 -302
- package/src/editor/skill-atlas/trees/create-component.ts +4 -17
- package/src/system/components/CollapsibleSection.svelte +15 -15
- package/template/package.json +1 -2
- package/template/vite.config.ts +3 -2
|
@@ -2,7 +2,7 @@ import type { SkillTree } from '../types';
|
|
|
2
2
|
|
|
3
3
|
export const checkCompliance: SkillTree = {
|
|
4
4
|
"id": "live-tokens-check-compliance",
|
|
5
|
-
"digest": "sha256:
|
|
5
|
+
"digest": "sha256:d6a1cdc3c9aead66",
|
|
6
6
|
"title": "check-compliance",
|
|
7
7
|
"tagline": "Check and Fix a Project's Use of Live Tokens",
|
|
8
8
|
"nodes": [
|
|
@@ -11,237 +11,37 @@ export const checkCompliance: SkillTree = {
|
|
|
11
11
|
"row": 0,
|
|
12
12
|
"kind": "trigger",
|
|
13
13
|
"title": "Check and fix design-system compliance",
|
|
14
|
-
"desc": "Checks for correct use of components, properties, and tokens, and fixes
|
|
14
|
+
"desc": "Checks for correct use of components, properties, and tokens, and fixes what it finds.",
|
|
15
15
|
"lines": [3, 3],
|
|
16
16
|
"anchor": "description: Check an existing @motion-proto/live-tokens pro"
|
|
17
17
|
},
|
|
18
|
-
{
|
|
19
|
-
"id": "cc2-run",
|
|
20
|
-
"row": 1,
|
|
21
|
-
"kind": "cli",
|
|
22
|
-
"title": "Generate the compliance report",
|
|
23
|
-
"desc": "One run reads the whole project: pending migrations, component facts, findings, and usage.",
|
|
24
|
-
"lines": [14, 14],
|
|
25
|
-
"anchor": "Run `npx live-tokens report --json`. Read it in its own key "
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"id": "cc2-sections",
|
|
29
|
-
"row": 2,
|
|
30
|
-
"kind": "chipset",
|
|
31
|
-
"title": "Read the report sections",
|
|
32
|
-
"desc": "The report's own key order, from project facts to usage.",
|
|
33
|
-
"lines": [37, 46],
|
|
34
|
-
"anchor": "## Report sections",
|
|
35
|
-
"anchorEnd": "| Project components unused (`usage.customUnused`) | The pro",
|
|
36
|
-
"chips": [
|
|
37
|
-
{
|
|
38
|
-
"label": "Pending token migrations",
|
|
39
|
-
"lines": [41, 41],
|
|
40
|
-
"anchor": "| Pending token migrations (`migrations`) | Whether `tokens."
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"label": "Component facts",
|
|
44
|
-
"lines": [42, 42],
|
|
45
|
-
"anchor": "| Component facts (`components[]`) | Every component the pro"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"label": "Checker findings by rule",
|
|
49
|
-
"lines": [43, 43],
|
|
50
|
-
"anchor": "| Checker findings by rule (`findings.pages`, `findings.comp"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"label": "Components each page renders",
|
|
54
|
-
"lines": [44, 44],
|
|
55
|
-
"anchor": "| Components each page renders (`usage.byPage`) | Which comp"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"label": "Shipped components no page renders",
|
|
59
|
-
"lines": [45, 45],
|
|
60
|
-
"anchor": "| Shipped components no page renders (`usage.unusedShipped`)"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"label": "Project components unused",
|
|
64
|
-
"lines": [46, 46],
|
|
65
|
-
"anchor": "| Project components unused (`usage.customUnused`) | The pro"
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"id": "cc2-migrate",
|
|
71
|
-
"row": 3,
|
|
72
|
-
"kind": "cli",
|
|
73
|
-
"title": "Run the token migrations",
|
|
74
|
-
"desc": "Bring tokens.css up to the installed package and heal the data tree. A stale file shows as unknown tokens.",
|
|
75
|
-
"lines": [15, 15],
|
|
76
|
-
"anchor": "Run `npx live-tokens migrate --check` to see the plan, then "
|
|
77
|
-
},
|
|
78
18
|
{
|
|
79
19
|
"id": "cc2-check",
|
|
80
|
-
"row":
|
|
20
|
+
"row": 1,
|
|
81
21
|
"kind": "cli",
|
|
82
|
-
"title": "Run
|
|
83
|
-
"desc": "
|
|
84
|
-
"lines": [
|
|
85
|
-
"anchor": "Run both checkers with `--json`. Each first
|
|
22
|
+
"title": "Run the checks",
|
|
23
|
+
"desc": "Both checkers bring tokens.css up to the installed package and apply every fix they can, then return the fixes beside the judgment calls that remain.",
|
|
24
|
+
"lines": [14, 18],
|
|
25
|
+
"anchor": "Run both checkers with `--json`. Each first brings `tokens.c",
|
|
86
26
|
"anchorEnd": "```"
|
|
87
27
|
},
|
|
88
28
|
{
|
|
89
|
-
"id": "cc2-
|
|
90
|
-
"row":
|
|
91
|
-
"kind": "chipset",
|
|
92
|
-
"title": "Read what remains",
|
|
93
|
-
"desc": "Every finding left carries its guidance and a repair of choice or authored.",
|
|
94
|
-
"lines": [21, 21],
|
|
95
|
-
"anchor": "Read what remains. Each finding carries the fields under Fin",
|
|
96
|
-
"chips": [
|
|
97
|
-
{
|
|
98
|
-
"label": "guidance",
|
|
99
|
-
"lines": [55, 55],
|
|
100
|
-
"anchor": "| `guidance` | How to make the repair: the token for the rol"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"label": "repair",
|
|
104
|
-
"lines": [56, 56],
|
|
105
|
-
"anchor": "| `repair` | `auto`, `choice`, or `authored`. See Repair lev"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"label": "exception",
|
|
109
|
-
"lines": [57, 57],
|
|
110
|
-
"anchor": "| `exception` | The narrower config entry that records a dec"
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
"label": "details",
|
|
114
|
-
"lines": [58, 58],
|
|
115
|
-
"anchor": "| `details` | Per-rule data the message already states in pr"
|
|
116
|
-
}
|
|
117
|
-
]
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"id": "cc2-group",
|
|
121
|
-
"row": 6,
|
|
122
|
-
"kind": "step",
|
|
123
|
-
"title": "Group findings by rule",
|
|
124
|
-
"desc": "Errors first, largest group first. Warnings only when the repair scope includes them.",
|
|
125
|
-
"lines": [22, 22],
|
|
126
|
-
"anchor": "Group the findings by rule. Take the largest error group fir"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
"id": "cc2-repair",
|
|
130
|
-
"row": 7,
|
|
131
|
-
"kind": "chipset",
|
|
132
|
-
"title": "Repair from guidance",
|
|
133
|
-
"desc": "Every repair follows its finding's guidance, within the scope rules.",
|
|
134
|
-
"lines": [23, 23],
|
|
135
|
-
"anchor": "Make every repair in the group from its `guidance`, within S",
|
|
136
|
-
"chips": [
|
|
137
|
-
{
|
|
138
|
-
"label": "choice",
|
|
139
|
-
"lines": [65, 65],
|
|
140
|
-
"anchor": "**`choice`.** A role or an ambiguous value determines the fi"
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"label": "authored",
|
|
144
|
-
"lines": [66, 66],
|
|
145
|
-
"anchor": "**`authored`.** New code is the fix: a runtime that has to s"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"label": "No new tokens",
|
|
149
|
-
"lines": [70, 70],
|
|
150
|
-
"anchor": "Add no token to `tokens.css`. Map a literal with no matching"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"label": "Name the shift",
|
|
154
|
-
"lines": [71, 71],
|
|
155
|
-
"anchor": "When the nearest token differs from the literal, use the tok"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"label": "Deliberate exceptions",
|
|
159
|
-
"lines": [72, 72],
|
|
160
|
-
"anchor": "Any finding, at any repair level, can stay as a deliberate e"
|
|
161
|
-
}
|
|
162
|
-
]
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
"id": "cc2-rerun",
|
|
166
|
-
"row": 8,
|
|
167
|
-
"kind": "cli",
|
|
168
|
-
"title": "Rerun both checkers",
|
|
169
|
-
"desc": "Run both checkers again to see what remains.",
|
|
170
|
-
"lines": [24, 24],
|
|
171
|
-
"anchor": "Run both checkers again. When repairable findings remain in "
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"id": "cc2-repeat",
|
|
175
|
-
"row": 9,
|
|
176
|
-
"kind": "gate",
|
|
177
|
-
"title": "Regroup the remaining findings",
|
|
178
|
-
"desc": "Findings a token can fix go back through grouping.",
|
|
179
|
-
"lines": [24, 24],
|
|
180
|
-
"anchor": "Run both checkers again. When repairable findings remain in "
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"id": "cc2-unresolved",
|
|
184
|
-
"row": 9,
|
|
185
|
-
"kind": "step",
|
|
186
|
-
"title": "Record the unresolved findings",
|
|
187
|
-
"desc": "A finding no token fits stays, and the reply says why.",
|
|
188
|
-
"lines": [70, 70],
|
|
189
|
-
"anchor": "Add no token to `tokens.css`. Map a literal with no matching"
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
"id": "cc2-strict",
|
|
193
|
-
"row": 10,
|
|
194
|
-
"kind": "cli",
|
|
195
|
-
"title": "Run strict checks",
|
|
196
|
-
"desc": "Strict mode counts every warning as an error.",
|
|
197
|
-
"lines": [25, 25],
|
|
198
|
-
"anchor": "When the errors are clear, run both checkers with `--strict`"
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
"id": "cc2-warnings",
|
|
202
|
-
"row": 11,
|
|
203
|
-
"kind": "decide",
|
|
204
|
-
"title": "Warning scope",
|
|
205
|
-
"desc": "Warnings are cleared when the request includes them. Otherwise the user chooses.",
|
|
206
|
-
"lines": [25, 26],
|
|
207
|
-
"anchor": "When the errors are clear, run both checkers with `--strict`",
|
|
208
|
-
"anchorEnd": "When the repair scope includes warnings, return to step 5 wi"
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
"id": "cc2-warning-loop",
|
|
212
|
-
"row": 12,
|
|
29
|
+
"id": "cc2-judge",
|
|
30
|
+
"row": 2,
|
|
213
31
|
"kind": "gate",
|
|
214
|
-
"title": "
|
|
215
|
-
"desc": "
|
|
216
|
-
"lines": [
|
|
217
|
-
"anchor": "
|
|
218
|
-
|
|
219
|
-
{
|
|
220
|
-
"id": "cc2-build",
|
|
221
|
-
"row": 13,
|
|
222
|
-
"kind": "step",
|
|
223
|
-
"title": "Gate the existing build",
|
|
224
|
-
"desc": "check:design runs both checkers with --no-fix, and the build runs it first once both exit 0.",
|
|
225
|
-
"lines": [76, 76],
|
|
226
|
-
"anchor": "When `package.json` has no `check:design` script, add `\"chec"
|
|
32
|
+
"title": "Make the judgment calls",
|
|
33
|
+
"desc": "Each judgment call carries its guidance. Make each call, then run the checks again.",
|
|
34
|
+
"lines": [19, 21],
|
|
35
|
+
"anchor": "Read what remains. Each finding carries the fields under Fin",
|
|
36
|
+
"anchorEnd": "Make every repair in the group from its `guidance`, within S"
|
|
227
37
|
},
|
|
228
38
|
{
|
|
229
39
|
"id": "cc2-reply",
|
|
230
|
-
"row":
|
|
231
|
-
"kind": "chipset",
|
|
232
|
-
"title": "Reply with the results",
|
|
233
|
-
"desc": "The report's picture, the fixes the checkers applied, the remaining changes by rule, the findings left with their reasons, and both exit codes.",
|
|
234
|
-
"lines": [28, 33],
|
|
235
|
-
"anchor": "Reply with:",
|
|
236
|
-
"anchorEnd": "both checker commands with their exit codes"
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"id": "cc2-done",
|
|
240
|
-
"row": 15,
|
|
40
|
+
"row": 3,
|
|
241
41
|
"kind": "done",
|
|
242
|
-
"title": "
|
|
243
|
-
"desc": "
|
|
244
|
-
"lines": [
|
|
42
|
+
"title": "Reply with the results",
|
|
43
|
+
"desc": "The fixes, the judgment calls made, the findings left with their reasons, and both exit codes.",
|
|
44
|
+
"lines": [25, 29],
|
|
245
45
|
"anchor": "Reply with:",
|
|
246
46
|
"anchorEnd": "both checker commands with their exit codes"
|
|
247
47
|
}
|
|
@@ -249,100 +49,23 @@ export const checkCompliance: SkillTree = {
|
|
|
249
49
|
"edges": [
|
|
250
50
|
{
|
|
251
51
|
"from": "cc2-trig",
|
|
252
|
-
"to": "cc2-run"
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
"from": "cc2-run",
|
|
256
|
-
"to": "cc2-sections"
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
"from": "cc2-sections",
|
|
260
|
-
"to": "cc2-migrate"
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
"from": "cc2-migrate",
|
|
264
52
|
"to": "cc2-check"
|
|
265
53
|
},
|
|
266
54
|
{
|
|
267
55
|
"from": "cc2-check",
|
|
268
|
-
"to": "cc2-
|
|
269
|
-
"label": "
|
|
56
|
+
"to": "cc2-judge",
|
|
57
|
+
"label": "judgment calls"
|
|
270
58
|
},
|
|
271
59
|
{
|
|
272
60
|
"from": "cc2-check",
|
|
273
|
-
"to": "cc2-
|
|
274
|
-
"label": "
|
|
61
|
+
"to": "cc2-reply",
|
|
62
|
+
"label": "fixed"
|
|
275
63
|
},
|
|
276
64
|
{
|
|
277
|
-
"from": "cc2-
|
|
278
|
-
"to": "cc2-
|
|
279
|
-
|
|
280
|
-
{
|
|
281
|
-
"from": "cc2-group",
|
|
282
|
-
"to": "cc2-repair"
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
"from": "cc2-repair",
|
|
286
|
-
"to": "cc2-rerun"
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
"from": "cc2-rerun",
|
|
290
|
-
"to": "cc2-repeat",
|
|
291
|
-
"label": "repairable findings"
|
|
292
|
-
},
|
|
293
|
-
{
|
|
294
|
-
"from": "cc2-repeat",
|
|
295
|
-
"to": "cc2-group",
|
|
296
|
-
"label": "return to step 5",
|
|
65
|
+
"from": "cc2-judge",
|
|
66
|
+
"to": "cc2-check",
|
|
67
|
+
"label": "rerun",
|
|
297
68
|
"back": true
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
"from": "cc2-rerun",
|
|
301
|
-
"to": "cc2-unresolved",
|
|
302
|
-
"label": "no token fits"
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
"from": "cc2-unresolved",
|
|
306
|
-
"to": "cc2-reply"
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
"from": "cc2-rerun",
|
|
310
|
-
"to": "cc2-strict",
|
|
311
|
-
"label": "errors clear"
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
"from": "cc2-strict",
|
|
315
|
-
"to": "cc2-warnings",
|
|
316
|
-
"label": "warnings"
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
"from": "cc2-strict",
|
|
320
|
-
"to": "cc2-build",
|
|
321
|
-
"label": "strict checks pass"
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
"from": "cc2-warnings",
|
|
325
|
-
"to": "cc2-warning-loop",
|
|
326
|
-
"label": "repair scope includes warnings"
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
"from": "cc2-warnings",
|
|
330
|
-
"to": "cc2-build",
|
|
331
|
-
"label": "user defers warnings"
|
|
332
|
-
},
|
|
333
|
-
{
|
|
334
|
-
"from": "cc2-warning-loop",
|
|
335
|
-
"to": "cc2-group",
|
|
336
|
-
"label": "use --strict",
|
|
337
|
-
"back": true
|
|
338
|
-
},
|
|
339
|
-
{
|
|
340
|
-
"from": "cc2-build",
|
|
341
|
-
"to": "cc2-reply"
|
|
342
|
-
},
|
|
343
|
-
{
|
|
344
|
-
"from": "cc2-reply",
|
|
345
|
-
"to": "cc2-done"
|
|
346
69
|
}
|
|
347
70
|
]
|
|
348
71
|
};
|
|
@@ -210,27 +210,18 @@ export const createComponent: SkillTree = {
|
|
|
210
210
|
"lines": [230, 230],
|
|
211
211
|
"anchor": "Each remaining finding carries a rule id, a line, and its `g"
|
|
212
212
|
},
|
|
213
|
-
{
|
|
214
|
-
"id": "cc-build",
|
|
215
|
-
"row": 8,
|
|
216
|
-
"kind": "step",
|
|
217
|
-
"title": "Run the Svelte check and the build",
|
|
218
|
-
"desc": "Both run once check-component exits 0.",
|
|
219
|
-
"lines": [231, 231],
|
|
220
|
-
"anchor": "Run the project's Svelte check and its build."
|
|
221
|
-
},
|
|
222
213
|
{
|
|
223
214
|
"id": "cc-reply",
|
|
224
|
-
"row":
|
|
215
|
+
"row": 8,
|
|
225
216
|
"kind": "step",
|
|
226
217
|
"title": "Reply with the result",
|
|
227
|
-
"desc": "The files, the id, the props, and
|
|
218
|
+
"desc": "The files, the id, the props, and the result of check-component, the Svelte check, and the build.",
|
|
228
219
|
"lines": [18, 18],
|
|
229
220
|
"anchor": "Reply with the files, the id, the props, and each check's re"
|
|
230
221
|
},
|
|
231
222
|
{
|
|
232
223
|
"id": "cc-page",
|
|
233
|
-
"row":
|
|
224
|
+
"row": 9,
|
|
234
225
|
"kind": "hand",
|
|
235
226
|
"title": "live-tokens-create-page",
|
|
236
227
|
"desc": "The component is done. Placing it on a page is the next skill.",
|
|
@@ -276,13 +267,9 @@ export const createComponent: SkillTree = {
|
|
|
276
267
|
},
|
|
277
268
|
{
|
|
278
269
|
"from": "cc-checks",
|
|
279
|
-
"to": "cc-
|
|
270
|
+
"to": "cc-reply",
|
|
280
271
|
"label": "exit 0"
|
|
281
272
|
},
|
|
282
|
-
{
|
|
283
|
-
"from": "cc-build",
|
|
284
|
-
"to": "cc-reply"
|
|
285
|
-
},
|
|
286
273
|
{
|
|
287
274
|
"from": "cc-reply",
|
|
288
275
|
"to": "cc-page"
|
|
@@ -74,18 +74,15 @@
|
|
|
74
74
|
</div>
|
|
75
75
|
{:else}
|
|
76
76
|
<div class="section-header" class:open>
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
>
|
|
85
|
-
<i class="fas fa-chevron-right toggle-icon"></i>
|
|
86
|
-
</button>
|
|
77
|
+
<button
|
|
78
|
+
type="button"
|
|
79
|
+
class="section-toggle-button section-toggle"
|
|
80
|
+
onclick={fireToggle}
|
|
81
|
+
aria-expanded={open}
|
|
82
|
+
>
|
|
83
|
+
<i class="fas fa-chevron-right toggle-icon" aria-hidden="true"></i>
|
|
87
84
|
<span class="section-label">{label}</span>
|
|
88
|
-
</
|
|
85
|
+
</button>
|
|
89
86
|
{@render summary?.()}
|
|
90
87
|
</div>
|
|
91
88
|
{/if}
|
|
@@ -199,11 +196,14 @@
|
|
|
199
196
|
}
|
|
200
197
|
}
|
|
201
198
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
199
|
+
/* The whole unlinked header toggles, so the button carries the label and
|
|
200
|
+
fills the row; a summary snippet still sits beside it. */
|
|
201
|
+
.section-toggle-button.section-toggle {
|
|
205
202
|
gap: var(--space-8);
|
|
206
|
-
flex
|
|
203
|
+
flex: 1 1 auto;
|
|
204
|
+
min-width: 0;
|
|
205
|
+
justify-content: flex-start;
|
|
206
|
+
text-align: start;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
/* Linked header: chevron is a sibling button next to the label link, not a
|
package/template/package.json
CHANGED
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "vite",
|
|
8
|
-
"build": "
|
|
8
|
+
"build": "vite build",
|
|
9
9
|
"preview": "vite preview",
|
|
10
10
|
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
11
|
-
"check:design": "live-tokens check-page --no-fix && live-tokens check-component --no-fix",
|
|
12
11
|
"test:design": "live-tokens check-component --tests && live-tokens check-page --tests",
|
|
13
12
|
"postinstall": "live-tokens setup-claude --force || exit 0"
|
|
14
13
|
},
|
package/template/vite.config.ts
CHANGED
|
@@ -5,8 +5,9 @@ import { themeFileApi } from '@motion-proto/live-tokens/vite-plugin';
|
|
|
5
5
|
export default defineConfig({
|
|
6
6
|
plugins: [
|
|
7
7
|
svelte({ preprocess: vitePreprocess() }),
|
|
8
|
-
//
|
|
9
|
-
//
|
|
8
|
+
// In dev, persists editor changes to src/system/styles/tokens.css and the
|
|
9
|
+
// JSON under src/live-tokens/data/. In `vite build`, runs the design checks
|
|
10
|
+
// first and stops the build on an error.
|
|
10
11
|
themeFileApi({ tokensCssPath: 'src/system/styles/tokens.css' }),
|
|
11
12
|
],
|
|
12
13
|
});
|