@x12i/docify-docs 1.0.0 → 1.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 +3 -13
- package/dist/index.d.ts +2 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -12
- package/dist/index.js.map +1 -1
- package/files/INDEX.md +40 -0
- package/files/SEARCH.json +514 -0
- package/files/agent-manifest.json +342 -0
- package/files/concepts/explicit-authoring.md +27 -0
- package/files/concepts/guide-vs-scenario.md +26 -0
- package/files/concepts/open-markdown.md +27 -0
- package/files/diagrams/docify-dual-audience.md +54 -0
- package/files/diagrams/sources/docify-dual-audience.mmd +4 -0
- package/files/glossary/docify.md +10 -0
- package/files/glossary/search-json.md +10 -0
- package/files/guides/scaffold-concept.md +40 -0
- package/files/indexes/books.json +47 -0
- package/files/indexes/books.md +9 -0
- package/files/indexes/concepts.json +23 -0
- package/files/indexes/concepts.md +5 -0
- package/files/indexes/diagrams.json +11 -0
- package/files/indexes/diagrams.md +3 -0
- package/files/indexes/guides.json +11 -0
- package/files/indexes/guides.md +3 -0
- package/files/indexes/scenarios.json +11 -0
- package/files/indexes/scenarios.md +3 -0
- package/files/indexes/tutorials.json +4 -0
- package/files/indexes/tutorials.md +3 -0
- package/files/indexes/use-cases.json +41 -0
- package/files/indexes/use-cases.md +8 -0
- package/files/knowledge.json +361 -0
- package/files/packs/concept/explicit-authoring/PACK.md +11 -0
- package/files/packs/concept/explicit-authoring/pack.json +14 -0
- package/files/packs/concept/guide-vs-scenario/PACK.md +11 -0
- package/files/packs/concept/guide-vs-scenario/pack.json +13 -0
- package/files/packs/concept/open-markdown/PACK.md +11 -0
- package/files/packs/concept/open-markdown/pack.json +13 -0
- package/files/packs/guide/scaffold-concept/PACK.md +11 -0
- package/files/packs/guide/scaffold-concept/pack.json +13 -0
- package/files/packs/scenario/choose-content-type/PACK.md +11 -0
- package/files/packs/scenario/choose-content-type/pack.json +11 -0
- package/files/scenarios/choose-content-type.md +54 -0
- package/files/use-cases/keep-one-design.md +46 -0
- package/files/use-cases/map-packages.md +83 -0
- package/files/use-cases/orient-docify.md +92 -0
- package/files/use-cases/ship-agent-packs.md +75 -0
- package/files/use-cases/ship-human-site.md +53 -0
- package/files/use-cases/wire-product-library.md +79 -0
- package/package.json +7 -25
- package/bin/docify-docs.js +0 -2
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -56
- package/dist/cli.js.map +0 -1
- package/dist/generated/bundle.d.ts +0 -358
- package/dist/generated/bundle.d.ts.map +0 -1
- package/dist/generated/bundle.js +0 -620
- package/dist/generated/bundle.js.map +0 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Map the @x12i/docify-* packages
|
|
2
|
+
|
|
3
|
+
> **Use case id:** `map-packages`
|
|
4
|
+
> **Goal:** Know which package owns schemas, theme, render, export, SDK, web, and screenshots.
|
|
5
|
+
> **Audiences:** developers
|
|
6
|
+
> **Tags:** packages, npm
|
|
7
|
+
|
|
8
|
+
## Reading path
|
|
9
|
+
|
|
10
|
+
1. **Packages** (developers) → chapters: `1-package-table`, `2-dependency-shape`, `3-publish-and-install`
|
|
11
|
+
|
|
12
|
+
## From: Packages — 1. Package table
|
|
13
|
+
|
|
14
|
+
| Folder | npm | Role |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| `docify-core` | `@x12i/docify-core` | Catalog / use-case / site-page / manifest schemas + loaders |
|
|
17
|
+
| `docify-theme` | `@x12i/docify-theme` | Shared site + reader CSS (tokens, site, book, extras) |
|
|
18
|
+
| `docify-render` | `@x12i/docify-render` | `BOOK.md` + site-pages → HTML; chapter extract / splice |
|
|
19
|
+
| `docify-export` | `@x12i/docify-export` | Content bundle builder (downloads, landings, agent-manifest) |
|
|
20
|
+
| `docify-sdk` | `@x12i/docify-sdk` | `createEbooksSdk(bundle)` knowledge SDK factory |
|
|
21
|
+
| `docify-web` | `@x12i/docify-web` | Shareable static web app + `docify-web serve` |
|
|
22
|
+
| `docify-screenshots` | `@x12i/docify-screenshots` | Shot lists, placeholders, capture helpers |
|
|
23
|
+
| `docify` | `@x12i/docify` | Platform docs knowledge SDK (dogfood — docs of docify itself) |
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## From: Packages — 2. Dependency shape
|
|
28
|
+
|
|
29
|
+
```mermaid
|
|
30
|
+
flowchart LR
|
|
31
|
+
Core[docify-core]
|
|
32
|
+
Theme[docify-theme]
|
|
33
|
+
Render[docify-render]
|
|
34
|
+
Export[docify-export]
|
|
35
|
+
Sdk[docify-sdk]
|
|
36
|
+
Web[docify-web]
|
|
37
|
+
Shots[docify-screenshots]
|
|
38
|
+
Dogfood["@x12i/docify"]
|
|
39
|
+
Render --> Core
|
|
40
|
+
Export --> Core
|
|
41
|
+
Export --> Render
|
|
42
|
+
Sdk --> Core
|
|
43
|
+
Web --> Theme
|
|
44
|
+
ProductDocs[product-docs build] --> Export
|
|
45
|
+
ProductDocs --> Web
|
|
46
|
+
ProductSdk["@…-docs"] --> Sdk
|
|
47
|
+
Dogfood --> Sdk
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
- **Humans** consume `docify-web` + theme assets from the assembled `dist/web`.
|
|
51
|
+
- **Agents** consume MD packs from the bundle and/or a published product knowledge SDK built on `docify-sdk`.
|
|
52
|
+
- **`@x12i/docify`** is this platform’s own knowledge SDK (docs of docify).
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## From: Packages — 3. Publish and install
|
|
57
|
+
|
|
58
|
+
From the monorepo (uses root `.npmrc`):
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
bash scripts/publish-docify.sh
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Typical product install:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm i @x12i/docify-core @x12i/docify-theme @x12i/docify-render \
|
|
68
|
+
@x12i/docify-export @x12i/docify-sdk @x12i/docify-web
|
|
69
|
+
npm i -D @x12i/docify # this platform’s docs knowledge SDK
|
|
70
|
+
npm i -D @x12i/memorix-docs # example product knowledge SDK
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
In this monorepo, product builds usually **import from source** under `x12i-docify/packages/*/dist` rather than resolving published tarballs during local `npm run docs`.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Also see
|
|
78
|
+
|
|
79
|
+
- **Packages** (`01-packages`) — Core, theme, render, export, SDK, web, and screenshots — what each package owns.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Orient on x12i-docify
|
|
2
|
+
|
|
3
|
+
> **Use case id:** `orient-docify`
|
|
4
|
+
> **Goal:** Understand the dual-audience platform and where product libraries fit.
|
|
5
|
+
> **Audiences:** developers, builders
|
|
6
|
+
> **Tags:** platform, start-here
|
|
7
|
+
|
|
8
|
+
## Reading path
|
|
9
|
+
|
|
10
|
+
1. **Platform Overview** (developers) → chapters: `the-central-idea`, `1-what-x12i-docify-is`, `2-layers`, `4-where-to-go-next`
|
|
11
|
+
|
|
12
|
+
## From: Platform Overview — The central idea
|
|
13
|
+
|
|
14
|
+
**x12i-docify** is the reusable **product site + docs + knowledge packs** platform for x12i monorepos.
|
|
15
|
+
|
|
16
|
+
> One content library (`BOOK.md` + use cases). Two consumption surfaces. Same design system everywhere — products change naming and content only.
|
|
17
|
+
|
|
18
|
+
| Audience | Best form | What we ship |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| **Humans** | Web app | Product home, docs hub, roles, use cases, catalog, book landings, chapter reader, MD/PDF downloads — `@x12i/docify-web` |
|
|
21
|
+
| **AI agents** | Markdown + packages | Per-book MD, use-case packs, chapter indexes, `agent-manifest.json`, `@x12i/docify-sdk` / product `@…-docs` |
|
|
22
|
+
|
|
23
|
+
Knowledge SDKs are **devDependencies** — documentation for tools and agents, not a production runtime.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## From: Platform Overview — 1. What x12i-docify is
|
|
28
|
+
|
|
29
|
+
### The problem it solves
|
|
30
|
+
|
|
31
|
+
Every product monorepo needs:
|
|
32
|
+
|
|
33
|
+
- a branded docs **site** humans can browse,
|
|
34
|
+
- **ebooks** with stable chapter structure,
|
|
35
|
+
- **task-first use cases** that deep-link into chapters,
|
|
36
|
+
- **agent-friendly** Markdown packs and a discoverable manifest,
|
|
37
|
+
- one **visual system** so products do not invent competing UIs.
|
|
38
|
+
|
|
39
|
+
Docify answers that with shared packages. Product folders supply content and brand strings only.
|
|
40
|
+
|
|
41
|
+
### Who uses what
|
|
42
|
+
|
|
43
|
+
| You are… | Primary surface | Install |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| Reader (human) | Product `dist/web` | Nothing — open the site |
|
|
46
|
+
| Content author | `BOOK.md` + `site-pages` + `data/*.json` | Platform packages in the monorepo |
|
|
47
|
+
| Integrator / platform engineer | `@x12i/docify-*` | Platform packages; optional product `@…-docs` as `devDependency` |
|
|
48
|
+
| AI agent / tooling | MD downloads + knowledge SDK | `npm i -D @your-scope/<product>-docs` |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## From: Platform Overview — 2. Layers
|
|
53
|
+
|
|
54
|
+
```mermaid
|
|
55
|
+
flowchart TB
|
|
56
|
+
Platform[x12i-docify platform packages]
|
|
57
|
+
Product["<product>-docs content library"]
|
|
58
|
+
Web[dist/web for humans]
|
|
59
|
+
SDK["@…-docs knowledge package"]
|
|
60
|
+
Product --> Platform
|
|
61
|
+
Product --> Web
|
|
62
|
+
Product --> SDK
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
| Layer | What it is |
|
|
66
|
+
|---|---|
|
|
67
|
+
| `x12i-docify` | Shared platform (theme, render, web, export, SDK, screenshots) |
|
|
68
|
+
| `<product>-docs/` | Product content: books, site-pages, catalog, use cases |
|
|
69
|
+
| `@x12i/<product>-docs` | Knowledge SDK + MD packs for agents (`npm i -D`) |
|
|
70
|
+
|
|
71
|
+
Memorix is the large reference implementation: `memorix-docs/` → `@x12i/memorix-docs`.
|
|
72
|
+
**This library** is the platform documenting itself (dogfood).
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## From: Platform Overview — 4. Where to go next
|
|
77
|
+
|
|
78
|
+
| Goal | Book |
|
|
79
|
+
|---|---|
|
|
80
|
+
| Package map | [Packages](../../01-packages/developers/BOOK.md) |
|
|
81
|
+
| Wire a new library | [Authoring a Library](../../02-authoring/developers/BOOK.md) |
|
|
82
|
+
| Human site behavior | [For Humans](../../03-for-humans/developers/BOOK.md) |
|
|
83
|
+
| Agent / SDK path | [For Agents](../../04-for-agents/developers/BOOK.md) |
|
|
84
|
+
| Theme contract | [Design System](../../05-design/developers/BOOK.md) |
|
|
85
|
+
|
|
86
|
+
## Also see
|
|
87
|
+
|
|
88
|
+
- **Platform Overview** (`00-platform-overview`) — What x12i-docify is, who it serves, and how product libraries plug in without forking UI.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Ship agent markdown and knowledge SDK
|
|
2
|
+
|
|
3
|
+
> **Use case id:** `ship-agent-packs`
|
|
4
|
+
> **Goal:** Export MD packs, agent-manifest.json, and a product @…-docs package for npm i -D.
|
|
5
|
+
> **Audiences:** developers
|
|
6
|
+
> **Tags:** agents, sdk
|
|
7
|
+
|
|
8
|
+
## Reading path
|
|
9
|
+
|
|
10
|
+
1. **For Agents** (developers) → chapters: `1-best-form-for-agents`, `2-discovery`, `3-knowledge-sdk`, `4-install-contract`
|
|
11
|
+
|
|
12
|
+
## From: For Agents — 1. Best form for agents
|
|
13
|
+
|
|
14
|
+
Agents should use **structured Markdown** and **packages**, not the HTML reader:
|
|
15
|
+
|
|
16
|
+
| Artifact | Role |
|
|
17
|
+
|---|---|
|
|
18
|
+
| Per-book `.md` | Full `BOOK.md` export |
|
|
19
|
+
| Use-case packs | Assembled MD for a task |
|
|
20
|
+
| `.chapters.json` | Chapter slug → title index |
|
|
21
|
+
| `agent-manifest.json` | Discovery map of all downloads |
|
|
22
|
+
| Knowledge SDK | `listUseCases`, `getUseCaseMarkdown`, `getBookMarkdown` |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## From: For Agents — 2. Discovery
|
|
27
|
+
|
|
28
|
+
Without the SDK:
|
|
29
|
+
|
|
30
|
+
1. Open `/agent-manifest.json` on the deployed web app
|
|
31
|
+
2. Follow `downloads/` paths for MD packs
|
|
32
|
+
3. Prefer chapter indexes when slicing context
|
|
33
|
+
|
|
34
|
+
With the SDK: install the product knowledge package and call the typed helpers.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## From: For Agents — 3. Knowledge SDK
|
|
39
|
+
|
|
40
|
+
Platform factory: `@x12i/docify-sdk` → `createEbooksSdk(bundle)`.
|
|
41
|
+
|
|
42
|
+
Product packages pre-wire a bundle (catalog, use cases, site, manifest, embedded files). Example:
|
|
43
|
+
|
|
44
|
+
```ts
|
|
45
|
+
import { memorixDocs } from "@x12i/memorix-docs";
|
|
46
|
+
|
|
47
|
+
const pack = memorixDocs.getUseCaseMarkdown("client-first-read-write");
|
|
48
|
+
const book = memorixDocs.getBookMarkdown("02-runtime-data-client", "developers");
|
|
49
|
+
const hits = memorixDocs.listUseCases({ audience: "developers", tag: "http" });
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
This platform’s own package is `@x12i/docify` (`docify`) — the docs of docify itself.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## From: For Agents — 4. Install contract
|
|
57
|
+
|
|
58
|
+
Knowledge packages document the product for tools and agents. They are **not** a production runtime dependency.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npm i -D @x12i/docify # this platform’s docs
|
|
62
|
+
npm i -D @x12i/memorix-docs # Memorix product example
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Export pipeline (`@x12i/docify-export`) emits MD + manifest alongside the web bundle. Stable use-case IDs keep agent prompts reproducible.
|
|
66
|
+
|
|
67
|
+
Start-here version with the full why/when: [Getting Started & Tutorials — Installation for agents](../../06-getting-started-and-tutorials/developers/BOOK.md).
|
|
68
|
+
|
|
69
|
+
## Also see
|
|
70
|
+
|
|
71
|
+
- **For Agents** (`04-for-agents`) — MD packs, chapter indexes, agent-manifest.json, and createEbooksSdk — install knowledge as a devDependency.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Ship the human web app
|
|
2
|
+
|
|
3
|
+
> **Use case id:** `ship-human-site`
|
|
4
|
+
> **Goal:** Build and serve dist/web with roles, use cases, catalog, and chapter reader.
|
|
5
|
+
> **Audiences:** developers, builders
|
|
6
|
+
> **Tags:** humans, web
|
|
7
|
+
|
|
8
|
+
## Reading path
|
|
9
|
+
|
|
10
|
+
1. **For Humans** (developers) → chapters: `1-best-form-for-humans`, `2-typical-flow`, `3-what-the-bundle-emits`
|
|
11
|
+
|
|
12
|
+
## From: For Humans — 1. Best form for humans
|
|
13
|
+
|
|
14
|
+
The **web app** (`@x12i/docify-web`) is the human surface: case-file UI, role chooser, use-case routing, chapter reader, and download buttons.
|
|
15
|
+
|
|
16
|
+
Humans should not be asked to scrape Markdown repos as their primary path. Deploy the static tree.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## From: For Humans — 2. Typical flow
|
|
21
|
+
|
|
22
|
+
1. **Role** — pick developers / builders (or product-defined roles)
|
|
23
|
+
2. **Use cases** — task-first entry; opens the right book + chapter
|
|
24
|
+
3. **Catalog** — browse books by family
|
|
25
|
+
4. **Reader** — chapter HTML in the shared book theme
|
|
26
|
+
5. **Downloads** — MD (and PDF when built) for offline reading
|
|
27
|
+
|
|
28
|
+
Product home (`/`) and docs hub (`/docs`) are authored as site-pages with YAML front-matter.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## From: For Humans — 3. What the bundle emits
|
|
33
|
+
|
|
34
|
+
| Path | Role |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `index.html`, `docs.html`, … | Marketing / docs chrome from site-pages |
|
|
37
|
+
| `books/<id>.html` | Book landings |
|
|
38
|
+
| `read.html` + chapter HTML | Reader shell |
|
|
39
|
+
| `catalog.json`, `use-cases.json`, `site.json` | Client data |
|
|
40
|
+
| `downloads/` | MD / PDF / chapter indexes |
|
|
41
|
+
| `agent-manifest.json` | Also useful for humans’ tooling links |
|
|
42
|
+
|
|
43
|
+
Assemble with `buildContentBundle`, then overlay `docify-web/public` runtime assets (`app.js`, `read.html`, `agents.html`).
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Also see
|
|
48
|
+
|
|
49
|
+
- **For Humans** (`03-for-humans`) — How people use @x12i/docify-web — roles, use cases, catalog, chapter reader, downloads.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Wire a product docs library
|
|
2
|
+
|
|
3
|
+
> **Use case id:** `wire-product-library`
|
|
4
|
+
> **Goal:** Add books, data/*.json, site-pages, and build scripts in another monorepo without forking theme or web.
|
|
5
|
+
> **Audiences:** developers, builders
|
|
6
|
+
> **Tags:** authoring, getting-started
|
|
7
|
+
|
|
8
|
+
## Reading path
|
|
9
|
+
|
|
10
|
+
1. **Authoring a Library** (developers) → chapters: `1-recipe`, `2-content-layout`, `3-data-contracts`, `4-build-pipeline`
|
|
11
|
+
|
|
12
|
+
## From: Authoring a Library — 1. Recipe
|
|
13
|
+
|
|
14
|
+
1. Depend on `@x12i/docify-{core,theme,render,export,sdk,web}` — do **not** fork theme or web app.
|
|
15
|
+
2. Author books as `NN-slug/{audience}/BOOK.md`.
|
|
16
|
+
3. Add product data:
|
|
17
|
+
- `data/site.json` — `product`, `brand`, `brandAccent`, `siteUrl`, `knowledgePackage`
|
|
18
|
+
- `data/catalog.json` — roles, families, books (kickers / colors / titles)
|
|
19
|
+
- `data/use-cases.json` — task → book + chapter slugs
|
|
20
|
+
4. Add `site-pages/*.md` with YAML front-matter (`product-home`, `docs-home`, …).
|
|
21
|
+
5. Wire build scripts to import platform packages (see `memorix-docs/scripts/` or `x12i-docify/scripts/`).
|
|
22
|
+
6. Publish `@your-scope/<product>-docs` as a **devDependency** knowledge SDK.
|
|
23
|
+
7. Deploy `dist/web` for humans; ship MD + `agent-manifest.json` for agents.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## From: Authoring a Library — 2. Content layout
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
<product>-docs/
|
|
31
|
+
data/{site,catalog,use-cases}.json
|
|
32
|
+
site-pages/*.md
|
|
33
|
+
NN-slug/
|
|
34
|
+
developers/BOOK.md
|
|
35
|
+
builders/BOOK.md # optional twin
|
|
36
|
+
site-pages/landing.md
|
|
37
|
+
diagrams/ … screenshots/
|
|
38
|
+
packages/<product>-docs/ # published knowledge SDK
|
|
39
|
+
scripts/build-bundle.mjs
|
|
40
|
+
scripts/build-knowledge.mjs
|
|
41
|
+
scripts/docs.mjs
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## From: Authoring a Library — 3. Data contracts
|
|
47
|
+
|
|
48
|
+
| File | Owns |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `site.json` | Brand chrome, accent CSS colors, nav, knowledge package name |
|
|
51
|
+
| `catalog.json` | Roles (`developers` \| `builders`), families, book metadata |
|
|
52
|
+
| `use-cases.json` | Stable use-case ids + reading paths (bookId, audience, chapter slugs) |
|
|
53
|
+
|
|
54
|
+
Chapter slugs are produced by slugifying `##` headings in `BOOK.md`. Broken use-case paths **fail the bundle build**.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## From: Authoring a Library — 4. Build pipeline
|
|
59
|
+
|
|
60
|
+
Typical scripts:
|
|
61
|
+
|
|
62
|
+
| Script | Job |
|
|
63
|
+
|---|---|
|
|
64
|
+
| `build-bundle.mjs` | `buildContentBundle` → `dist/bundle` + assemble `dist/web` |
|
|
65
|
+
| `build-knowledge.mjs` | Embed downloads + JSON into `packages/<sdk>/src/generated/bundle.ts` |
|
|
66
|
+
| `docs.mjs` | Build if needed, `docify-web serve dist/web`, open browser |
|
|
67
|
+
|
|
68
|
+
Env: set `EBOOKS_PDF=0` or `DOCIFY_PDF=0` to skip PDF when `wkhtmltopdf` is unavailable.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Also see
|
|
73
|
+
|
|
74
|
+
- **Authoring a Library** (`02-authoring`) — Recipe to ship a product docs library: BOOK.md layout, data/*.json, site-pages, and the build pipeline.
|
|
75
|
+
- **Design System** (`05-design`) — Shared theme tokens and surfaces — products change naming and content only.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
_Generated use-case pack for agents and humans. See `agent-manifest.json` for discovery._
|
package/package.json
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@x12i/docify-docs",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Docify platform dogfood knowledge package — open Markdown, indexes, and SDK. Install as a devDependency only.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
-
"bin": {
|
|
9
|
-
"docify-docs": "bin/docify-docs.js"
|
|
10
|
-
},
|
|
11
8
|
"exports": {
|
|
12
9
|
".": {
|
|
13
10
|
"types": "./dist/index.d.ts",
|
|
@@ -16,42 +13,27 @@
|
|
|
16
13
|
},
|
|
17
14
|
"files": [
|
|
18
15
|
"dist",
|
|
19
|
-
"
|
|
16
|
+
"files",
|
|
20
17
|
"README.md"
|
|
21
18
|
],
|
|
22
19
|
"scripts": {
|
|
23
20
|
"prebuild": "rm -rf dist",
|
|
24
|
-
"build": "tsc -p tsconfig.build.json
|
|
25
|
-
"test": "vitest run",
|
|
21
|
+
"build": "tsc -p tsconfig.build.json",
|
|
26
22
|
"typecheck": "tsc --noEmit"
|
|
27
23
|
},
|
|
28
24
|
"engines": {
|
|
29
25
|
"node": ">=18.0.0"
|
|
30
26
|
},
|
|
31
27
|
"dependencies": {
|
|
32
|
-
"@x12i/docify
|
|
33
|
-
"@x12i/docify-sdk": "^1.0
|
|
28
|
+
"@x12i/docify": "^1.1.0",
|
|
29
|
+
"@x12i/docify-sdk": "^1.1.0"
|
|
34
30
|
},
|
|
35
31
|
"devDependencies": {
|
|
36
|
-
"
|
|
37
|
-
"typescript": "^5.6.0",
|
|
38
|
-
"vitest": "^2.1.0"
|
|
32
|
+
"typescript": "^5.6.0"
|
|
39
33
|
},
|
|
40
34
|
"publishConfig": {
|
|
41
35
|
"access": "public",
|
|
42
36
|
"registry": "https://registry.npmjs.org/"
|
|
43
37
|
},
|
|
44
|
-
"repository": {
|
|
45
|
-
"type": "git",
|
|
46
|
-
"url": "git+ssh://git@github.com/x12i/memorix-mono-repo.git",
|
|
47
|
-
"directory": "x12i-docify/packages/docify-docs"
|
|
48
|
-
},
|
|
49
|
-
"keywords": [
|
|
50
|
-
"x12i",
|
|
51
|
-
"docify",
|
|
52
|
-
"docs",
|
|
53
|
-
"knowledge",
|
|
54
|
-
"devDependency"
|
|
55
|
-
],
|
|
56
38
|
"license": "exellix-license"
|
|
57
39
|
}
|
package/bin/docify-docs.js
DELETED
package/dist/cli.d.ts
DELETED
package/dist/cli.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
|
package/dist/cli.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { docifyDocs } from "./index.js";
|
|
3
|
-
const [cmd, id, audience] = process.argv.slice(2);
|
|
4
|
-
function usage() {
|
|
5
|
-
console.error(`Usage:
|
|
6
|
-
docify-docs use-case <id> Print assembled use-case markdown
|
|
7
|
-
docify-docs book <id> <audience> Print book markdown
|
|
8
|
-
docify-docs list-use-cases List use case ids
|
|
9
|
-
docify-docs list-books List book ids
|
|
10
|
-
`);
|
|
11
|
-
}
|
|
12
|
-
if (!cmd || cmd === "help" || cmd === "--help") {
|
|
13
|
-
usage();
|
|
14
|
-
process.exit(cmd ? 0 : 1);
|
|
15
|
-
}
|
|
16
|
-
if (cmd === "list-use-cases") {
|
|
17
|
-
for (const uc of docifyDocs.listUseCases()) {
|
|
18
|
-
console.log(`${uc.id}\t${uc.title}`);
|
|
19
|
-
}
|
|
20
|
-
process.exit(0);
|
|
21
|
-
}
|
|
22
|
-
if (cmd === "list-books") {
|
|
23
|
-
for (const b of docifyDocs.listBooks()) {
|
|
24
|
-
console.log(`${b.id}\t${b.title}\t${b.audiences.join(",")}`);
|
|
25
|
-
}
|
|
26
|
-
process.exit(0);
|
|
27
|
-
}
|
|
28
|
-
if (cmd === "use-case") {
|
|
29
|
-
if (!id) {
|
|
30
|
-
usage();
|
|
31
|
-
process.exit(1);
|
|
32
|
-
}
|
|
33
|
-
const md = docifyDocs.getUseCaseMarkdown(id);
|
|
34
|
-
if (!md) {
|
|
35
|
-
console.error(`Unknown use case: ${id}`);
|
|
36
|
-
process.exit(1);
|
|
37
|
-
}
|
|
38
|
-
process.stdout.write(md);
|
|
39
|
-
process.exit(0);
|
|
40
|
-
}
|
|
41
|
-
if (cmd === "book") {
|
|
42
|
-
if (!id || !audience) {
|
|
43
|
-
usage();
|
|
44
|
-
process.exit(1);
|
|
45
|
-
}
|
|
46
|
-
const md = docifyDocs.getBookMarkdown(id, audience);
|
|
47
|
-
if (!md) {
|
|
48
|
-
console.error(`Unknown book/audience: ${id} ${audience}`);
|
|
49
|
-
process.exit(1);
|
|
50
|
-
}
|
|
51
|
-
process.stdout.write(md);
|
|
52
|
-
process.exit(0);
|
|
53
|
-
}
|
|
54
|
-
usage();
|
|
55
|
-
process.exit(1);
|
|
56
|
-
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,CAAC,GAAG,EAAE,EAAE,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAElD,SAAS,KAAK;IACZ,OAAO,CAAC,KAAK,CAAC;;;;;CAKf,CAAC,CAAC;AACH,CAAC;AAED,IAAI,CAAC,GAAG,IAAI,GAAG,KAAK,MAAM,IAAI,GAAG,KAAK,QAAQ,EAAE,CAAC;IAC/C,KAAK,EAAE,CAAC;IACR,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5B,CAAC;AAED,IAAI,GAAG,KAAK,gBAAgB,EAAE,CAAC;IAC7B,KAAK,MAAM,EAAE,IAAI,UAAU,CAAC,YAAY,EAAE,EAAE,CAAC;QAC3C,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;IACvC,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,IAAI,GAAG,KAAK,YAAY,EAAE,CAAC;IACzB,KAAK,MAAM,CAAC,IAAI,UAAU,CAAC,SAAS,EAAE,EAAE,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,IAAI,GAAG,KAAK,UAAU,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,KAAK,EAAE,CAAC;QACR,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,MAAM,EAAE,GAAG,UAAU,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;IAC7C,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE,EAAE,CAAC,CAAC;QACzC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACzB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,IAAI,GAAG,KAAK,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;QACrB,KAAK,EAAE,CAAC;QACR,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,MAAM,EAAE,GAAG,UAAU,CAAC,eAAe,CAAC,EAAE,EAAE,QAAqC,CAAC,CAAC;IACjF,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,IAAI,QAAQ,EAAE,CAAC,CAAC;QAC1D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACzB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,KAAK,EAAE,CAAC;AACR,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC"}
|