@kdrgny/justjson 1.1.0 → 1.4.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 +8 -4
- package/dist/cli.js +1026 -125
- package/dist/editor/assets/index-B7tRIQcy.js +632 -0
- package/dist/editor/assets/index-GwsCiKhf.css +1 -0
- package/dist/editor/assets/public-sans-latin-ext-wght-normal-MQgHevqp.woff2 +0 -0
- package/dist/editor/assets/public-sans-latin-wght-normal-DdeTHZLK.woff2 +0 -0
- package/dist/editor/assets/public-sans-vietnamese-wght-normal-CtlIRbEm.woff2 +0 -0
- package/dist/editor/assets/space-mono-latin-400-normal-Rg4St2Dn.woff2 +0 -0
- package/dist/editor/assets/space-mono-latin-400-normal-_3DlpgIW.woff +0 -0
- package/dist/editor/assets/space-mono-latin-700-normal-D7A851RN.woff +0 -0
- package/dist/editor/assets/space-mono-latin-700-normal-mWgeinG7.woff2 +0 -0
- package/dist/editor/assets/space-mono-latin-ext-400-normal-D4cJI_B-.woff +0 -0
- package/dist/editor/assets/space-mono-latin-ext-400-normal-DTLbW2xa.woff2 +0 -0
- package/dist/editor/assets/space-mono-latin-ext-700-normal-B2s3bDs2.woff2 +0 -0
- package/dist/editor/assets/space-mono-latin-ext-700-normal-B_E7P90g.woff +0 -0
- package/dist/editor/assets/space-mono-vietnamese-400-normal-B0PMp_xB.woff +0 -0
- package/dist/editor/assets/space-mono-vietnamese-400-normal-BNOj0Qhp.woff2 +0 -0
- package/dist/editor/assets/space-mono-vietnamese-700-normal-D-KrLuLr.woff +0 -0
- package/dist/editor/assets/space-mono-vietnamese-700-normal-DWQgDHuA.woff2 +0 -0
- package/dist/editor/index.html +3 -3
- package/package.json +3 -14
- package/dist/editor/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/editor/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/editor/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/editor/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/editor/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/editor/assets/index-B-aBBk0p.css +0 -1
- package/dist/editor/assets/index-DhyPvr9S.js +0 -574
package/README.md
CHANGED
|
@@ -39,19 +39,23 @@ Design your schema, enter content, upload images. Everything is written to `cont
|
|
|
39
39
|
| **Searchable content table** | Entries listed by title, slug and date. Search and edit instantly — content, not a pile of slugs. |
|
|
40
40
|
| **Rich-text editor** | Headings, bold, lists, quotes — WYSIWYG, saved to disk as clean, diffable Markdown. |
|
|
41
41
|
| **Image uploads** | Drop an image; it's resized to WebP in the browser and written under `content/media/`. |
|
|
42
|
-
| **Type-safe output** | Generates `types.ts`
|
|
42
|
+
| **Type-safe output** | Generates `types.ts` **and** a zero-dependency `content.ts` loader — `loadPosts()`, `loadSettings()` — so your content is typed in your build. |
|
|
43
|
+
| **Validate in CI** | `justjson validate` checks content against the schema — broken relations, duplicate slugs, missing media, type errors. Exits non-zero on failure. |
|
|
44
|
+
| **Draft / published** | Toggle an entry's status; the generated loader returns published entries by default. |
|
|
45
|
+
| **English or Turkish** | The editor ships in English; switch to Turkish from the project menu any time. |
|
|
43
46
|
| **Export any time** | One click downloads schema + content + types as a ZIP. Nothing is ever locked in. |
|
|
44
47
|
| **The endpoint is yours** | Wherever you put the JSON becomes your API — repo raw, jsDelivr, your build. |
|
|
45
48
|
|
|
46
|
-
Field types: `text` · `richtext` · `number` · `boolean` · `date` · `select` · `relation` (multi) · `image
|
|
49
|
+
Field types: `text` · `richtext` · `number` · `boolean` · `date` · `select` · `relation` (multi) · `image` · `url` · `email` · `list` · `color` · `group` (nested).
|
|
47
50
|
|
|
48
51
|
## Commands
|
|
49
52
|
|
|
50
53
|
| Command | What it does |
|
|
51
54
|
|---|---|
|
|
52
55
|
| `npx @kdrgny/justjson` (or `serve`) | Starts the local editor and opens it in your browser |
|
|
53
|
-
| `npx @kdrgny/justjson init [template]` | Scaffolds a schema from a template (`blog`, `cv`, `portfolio`, `docs`, `changelog`) |
|
|
54
|
-
| `npx @kdrgny/justjson types` | Generates `types.ts` from your schema |
|
|
56
|
+
| `npx @kdrgny/justjson init [template]` | Scaffolds a schema from a template (`blog`, `cv`, `portfolio`, `docs`, `changelog`, `recipe`, `event`, `catalog`) |
|
|
57
|
+
| `npx @kdrgny/justjson types` | Generates `types.ts` + a typed `content.ts` loader from your schema |
|
|
58
|
+
| `npx @kdrgny/justjson validate` | Checks content against the schema (`--json`, `--strict`) — great for CI |
|
|
55
59
|
| `npx @kdrgny/justjson export` | Exports a ZIP snapshot (schema + content + types) |
|
|
56
60
|
|
|
57
61
|
## How it works
|