@syncline-design/cli 0.1.0-sandbox.52 → 0.1.0-sandbox.53
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/README.md +30 -15
- package/bin.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/{run-B6_BdS7j.js → run-Cr3o-ltQ.js} +11118 -11120
package/README.md
CHANGED
|
@@ -19,10 +19,10 @@ Until the first stable release only the `sandbox` tag exists.
|
|
|
19
19
|
|
|
20
20
|
## What it reads and writes
|
|
21
21
|
|
|
22
|
-
| |
|
|
23
|
-
| ------ |
|
|
24
|
-
| Reads | `.
|
|
25
|
-
| Writes | components, stories, vector assets, the theme and its `ThemeProvider`, Storybook docs and wiring (`.storybook/`), and the `tsconfig.json` entry for the theme typings
|
|
22
|
+
| | |
|
|
23
|
+
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
24
|
+
| Reads | `.syncline/design.json` (required), `.syncline/assets.json`, `.syncline/annotations.json` and `.syncline/design.enriched.json` (optional), `.syncline/fonts.resolved.json` (optional, written by the font lookup), `syncline.config.json` (optional) |
|
|
25
|
+
| Writes | components, stories, vector assets, the theme and its `ThemeProvider`, Storybook docs and wiring (`.storybook/`), and the `tsconfig.json` entry for the theme typings |
|
|
26
26
|
|
|
27
27
|
Output is formatted with **your own prettier config**, so it matches what your
|
|
28
28
|
commit hooks produce and a re-run shows no formatting churn.
|
|
@@ -31,6 +31,21 @@ Hand-editable files are written once and never overwritten unless you ask:
|
|
|
31
31
|
stories (`stories.overwrite`), docs guidelines (`docs.overwriteGuidelines`) and
|
|
32
32
|
a hand-written `.storybook/manager.ts`.
|
|
33
33
|
|
|
34
|
+
## Upgrading from `.figma/`
|
|
35
|
+
|
|
36
|
+
Earlier versions kept the Figma export in a `.figma/` folder. It is now
|
|
37
|
+
`.syncline/` (the folder is named after the tool, not after Figma), and the CLI
|
|
38
|
+
no longer reads `.figma/`. In a repository that still has it:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
git mv .figma .syncline
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
If a sync seeded `.github/workflows/syncline.yml` earlier, delete it and sync
|
|
45
|
+
again: the old file only watches `.figma/**`, so it would never run for the new
|
|
46
|
+
folder. A `syncline.config.json` that spells out `inputs.*` or `merge.baseDir`
|
|
47
|
+
with the old paths needs the same one-word change.
|
|
48
|
+
|
|
34
49
|
## Options
|
|
35
50
|
|
|
36
51
|
| Option | |
|
|
@@ -54,11 +69,11 @@ Every key is optional; this is the full shape with its defaults. The Figma plugi
|
|
|
54
69
|
"styling": "styled-components",
|
|
55
70
|
"libraryName": "design-system", // names the docs and the Storybook chrome
|
|
56
71
|
"inputs": {
|
|
57
|
-
"design": ".
|
|
58
|
-
"enriched": ".
|
|
59
|
-
"assets": ".
|
|
60
|
-
"annotations": ".
|
|
61
|
-
"fonts": ".
|
|
72
|
+
"design": ".syncline/design.json",
|
|
73
|
+
"enriched": ".syncline/design.enriched.json", // absent on disk => raw tier
|
|
74
|
+
"assets": ".syncline/assets.json",
|
|
75
|
+
"annotations": ".syncline/annotations.json", // the designer's intents; absent => none
|
|
76
|
+
"fonts": ".syncline/fonts.resolved.json", // where each font can be loaded from; commit it
|
|
62
77
|
},
|
|
63
78
|
"paths": {
|
|
64
79
|
"components": "src/components",
|
|
@@ -81,7 +96,7 @@ Every key is optional; this is the full shape with its defaults. The Figma plugi
|
|
|
81
96
|
},
|
|
82
97
|
"merge": {
|
|
83
98
|
"enabled": false, // keep hand edits to generated components when the design changes
|
|
84
|
-
"baseDir": ".
|
|
99
|
+
"baseDir": ".syncline/base", // the last generated version of each component; commit it
|
|
85
100
|
"llm": false, // paid: let the bridge resolve what a 3-way merge can't
|
|
86
101
|
"sendSource": false, // required with llm: the conflicting files' source is sent to the bridge
|
|
87
102
|
},
|
|
@@ -239,7 +254,7 @@ the roles and texts a story can act on; no source code. The model's answer is
|
|
|
239
254
|
data that the CLI validates against the real component (props, options and
|
|
240
255
|
targets must exist) before it renders the `play()` with `storybook/test`, so
|
|
241
256
|
whatever the model gets wrong is dropped, not written. Answers are cached in
|
|
242
|
-
`.
|
|
257
|
+
`.syncline/stories.enriched.json` (commit it), `--check` and `--no-enrich` never
|
|
243
258
|
call the bridge, and a run without a bridge, credentials or the paid plan just
|
|
244
259
|
writes the plain stories. An existing stories file is never rewritten.
|
|
245
260
|
|
|
@@ -262,7 +277,7 @@ no font files. See [Fonts](../../docs/fonts/README.md).
|
|
|
262
277
|
|
|
263
278
|
`generate` asks [Fontsource](https://fontsource.org) (the Google Fonts as npm
|
|
264
279
|
packages) about each family it has not seen and records the answer, "not found"
|
|
265
|
-
included, in `.
|
|
280
|
+
included, in `.syncline/fonts.resolved.json`; commit it so a re-run needs no network.
|
|
266
281
|
`--check` and `--no-enrich` use that file and never go online, and a request that
|
|
267
282
|
fails leaves the family unknown (retried next run), never "missing".
|
|
268
283
|
`syncline fonts` runs just the lookup and lists where each family comes from.
|
|
@@ -294,7 +309,7 @@ generated files are stale:
|
|
|
294
309
|
name: synclineon:
|
|
295
310
|
push:
|
|
296
311
|
branches: [main]
|
|
297
|
-
paths: ['.
|
|
312
|
+
paths: ['.syncline/**', 'syncline.config.json']
|
|
298
313
|
pull_request:
|
|
299
314
|
|
|
300
315
|
jobs:
|
|
@@ -342,7 +357,7 @@ permissions:
|
|
|
342
357
|
|
|
343
358
|
How a run behaves:
|
|
344
359
|
|
|
345
|
-
- The result is written to `.
|
|
360
|
+
- The result is written to `.syncline/design.enriched.json`, which is also the
|
|
346
361
|
cache: a component is only sent again when its facts or the bridge's prompt
|
|
347
362
|
version change. Commit the file, so the next run (and `--check`) reuses it.
|
|
348
363
|
- A component that fails is retried once, then left on the raw tier and retried
|
|
@@ -354,7 +369,7 @@ How a run behaves:
|
|
|
354
369
|
|
|
355
370
|
## Annotation overlay
|
|
356
371
|
|
|
357
|
-
`.
|
|
372
|
+
`.syncline/annotations.json` holds the same annotation lines a Figma component
|
|
358
373
|
description can carry (`@select`, `@input search`, `@continuous Progress 0..100`,
|
|
359
374
|
see the generated _Figma annotations_ guideline), keyed by the component's Figma
|
|
360
375
|
key, plus page entries (`@iconset` / `@iconset off`) for icon-set merging. The
|
package/bin.js
CHANGED
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, k as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, w as D, x as O, y as k } from "./run-
|
|
1
|
+
import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, k as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, w as D, x as O, y as k } from "./run-Cr3o-ltQ.js";
|
|
2
2
|
import { join as A } from "node:path";
|
|
3
3
|
//#region src/stories/project-step.ts
|
|
4
4
|
async function j(n) {
|