@sorb/juice 0.1.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/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # @sorb/juice
2
+
3
+ Local token bridge server and dev tooling for
4
+ [Sorb](https://github.com/nhunsaker/sorb). A dev dependency only —
5
+ it never touches production.
6
+
7
+ ```bash
8
+ npm install -D @sorb/juice
9
+ ```
10
+
11
+ This installs the `sorb` binary into your project. To run it once
12
+ without installing first, use the full package name with npx:
13
+
14
+ ```bash
15
+ npx @sorb/juice init
16
+ ```
17
+
18
+ > `sorb` is the binary, not the package name. `npx sorb` only works
19
+ > after `@sorb/juice` is installed locally; otherwise npx fails
20
+ > with `could not determine executable to run`.
21
+
22
+ ## Commands
23
+
24
+ Once installed, run via npx or an npm script:
25
+
26
+ ```bash
27
+ sorb init # create a sorb.config.json
28
+ sorb dev # start the local token bridge server (default command)
29
+ sorb commit \ # open a GitHub PR with the current token file
30
+ --owner my-org --repo my-repo --pat ghp_xxx \
31
+ --message "Update primary color to indigo"
32
+ ```
33
+
34
+ ## What `sorb dev` does
35
+
36
+ - Serves the preview API the Figma plugin and your React app talk to:
37
+ `POST/GET/PUT/DELETE /preview`, `GET /tokens/latest`, `GET /health`.
38
+ - Watches your source `tokens.json` and, if configured, re-runs Style
39
+ Dictionary on every change.
40
+
41
+ Configure it with `sorb.config.json`:
42
+
43
+ ```json
44
+ {
45
+ "namespace": "my-app",
46
+ "tokenPath": "tokens/tokens.json",
47
+ "styleDictionaryConfig": "sd.config.js",
48
+ "port": 7777
49
+ }
50
+ ```
51
+
52
+ See the [main README](https://github.com/nhunsaker/sorb#readme) for the
53
+ full workflow.