@josui/token-studio 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 +74 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +676 -0
- package/dist/cli.js.map +1 -0
- package/dist/web/assets/index-CqwciMmq.css +1 -0
- package/dist/web/assets/index-Dmc-VLJo.js +66 -0
- package/dist/web/index.html +13 -0
- package/package.json +54 -0
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# @josui/token-studio
|
|
2
|
+
|
|
3
|
+
Local CRUD editor for DTCG token category files.
|
|
4
|
+
|
|
5
|
+
See architecture and roadmap: `ARCHITECTURE.md`.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
|
|
9
|
+
### In this monorepo (development)
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm --filter @josui/token-studio build
|
|
13
|
+
pnpm --filter @josui/token-studio exec josui-token-studio
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### In any project (installed package consumer)
|
|
17
|
+
|
|
18
|
+
Install:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install -D @josui/token-studio
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Run:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx josui-token-studio
|
|
28
|
+
# or
|
|
29
|
+
npm exec josui-token-studio
|
|
30
|
+
# or
|
|
31
|
+
pnpm exec josui-token-studio
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Global install is also supported:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm install -g @josui/token-studio
|
|
38
|
+
josui-token-studio
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### CLI options
|
|
42
|
+
|
|
43
|
+
- `--cwd <path>`: project root (defaults to current directory)
|
|
44
|
+
- `--config <path>`: explicit config file path
|
|
45
|
+
- `--tokens-dir <path>`: override token category folder
|
|
46
|
+
- `--port <number>`: local server port
|
|
47
|
+
- `--no-open`: do not open browser automatically
|
|
48
|
+
|
|
49
|
+
## Config File
|
|
50
|
+
|
|
51
|
+
Token Studio auto-discovers a config file by walking upward from the current directory:
|
|
52
|
+
|
|
53
|
+
- `token-studio.config.json`
|
|
54
|
+
- `.token-studio.json`
|
|
55
|
+
|
|
56
|
+
Example:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"tokensDir": "packages/tokens/src/tokens",
|
|
61
|
+
"terrazzoPath": "packages/tokens/terrazzo.config.mjs"
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Create this file at your project root (or pass `--config <path>`).
|
|
66
|
+
|
|
67
|
+
`--tokens-dir` still takes precedence over config values.
|
|
68
|
+
|
|
69
|
+
## Routes
|
|
70
|
+
|
|
71
|
+
- `/categories`
|
|
72
|
+
- `/categories/$name`
|
|
73
|
+
- `/changes`
|
|
74
|
+
- `/settings`
|
package/dist/cli.d.ts
ADDED