create-zudo-doc 4.2.0 → 4.3.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/dist/claude-md-gen.js +2 -1
- package/dist/scaffold.d.ts +1 -1
- package/dist/scaffold.js +2 -5
- package/dist/zfb-config-gen.js +1 -0
- package/package.json +1 -1
- package/templates/base/scripts/setup-doc-skill.sh +5 -3
- package/templates/features/claudeSkills/files/.claude/skills/zudo-doc-design-system/SKILL.md +4 -0
- package/templates/features/claudeSkills/files/.claude/skills/zudo-doc-version-bump/SKILL.md +23 -5
package/dist/claude-md-gen.js
CHANGED
|
@@ -21,7 +21,7 @@ export function generateCLAUDEFile(choices) {
|
|
|
21
21
|
lines.push(`- **MDX** — content format, authored under \`src/content/\``);
|
|
22
22
|
lines.push(`- **Tailwind CSS v4** — via \`@tailwindcss/vite\``);
|
|
23
23
|
lines.push(`- **Preact** — for interactive islands only (with compat mode for React API)`);
|
|
24
|
-
lines.push(
|
|
24
|
+
lines.push("- **zfb semantic highlighting** — native build-time fenced-code rendering plus lazy `@takazudo/zfb-md-wasm` for HtmlPreview; both emit `hi-*` classes resolved through `--zd-syntax-*` design tokens");
|
|
25
25
|
lines.push(`- **@takazudo/zudo-doc** — the package that owns everything: layout, chrome, islands, default \`@theme\` design tokens, and (via \`packageOwnedRoutes\`, on by default) the doc routes themselves`);
|
|
26
26
|
lines.push(``);
|
|
27
27
|
// Commands
|
|
@@ -31,6 +31,7 @@ export function generateCLAUDEFile(choices) {
|
|
|
31
31
|
if (choices.features.includes("docHistory")) {
|
|
32
32
|
lines.push(`- \`${pmRunCommand(pm, "dev")}\` — runs the zfb dev server (port 4321) and the doc-history API server (port 4322) concurrently via \`run-p\` (\`${pmRunCommand(pm, "dev:zfb")}\` / \`${pmRunCommand(pm, "dev:history")}\` individually)`);
|
|
33
33
|
lines.push(`- \`${pmRunCommand(pm, "dev:network")}\` — same, but zfb binds \`--host 0.0.0.0\` for LAN access (\`${pmRunCommand(pm, "dev:zfb:network")}\` individually); the doc-history server stays loopback-only and LAN clients reach it through zfb's \`/doc-history/*\` dev proxy`);
|
|
34
|
+
lines.push(`- **Trusted networks only:** this also serves your git doc-history — including UNPUBLISHED local commits — to anyone on the LAN via the \`/doc-history/*\` proxy`);
|
|
34
35
|
lines.push(`- \`run-p\` swallows trailing args, so other zfb flags don't forward through \`${pmRunCommand(pm, "dev")}\` — pass them directly instead: \`${pm} run dev:zfb -- <flags>\``);
|
|
35
36
|
}
|
|
36
37
|
else {
|
package/dist/scaffold.d.ts
CHANGED
|
@@ -18,5 +18,5 @@ export { getSecondaryLang };
|
|
|
18
18
|
*
|
|
19
19
|
* Bumped in lockstep by scripts/release-create-zudo-doc.sh.
|
|
20
20
|
*/
|
|
21
|
-
export declare const ZUDO_DOC_PIN = "^4.
|
|
21
|
+
export declare const ZUDO_DOC_PIN = "^4.3.0";
|
|
22
22
|
export declare function scaffold(choices: UserChoices): Promise<void>;
|
package/dist/scaffold.js
CHANGED
|
@@ -24,7 +24,7 @@ export { getSecondaryLang };
|
|
|
24
24
|
*
|
|
25
25
|
* Bumped in lockstep by scripts/release-create-zudo-doc.sh.
|
|
26
26
|
*/
|
|
27
|
-
export const ZUDO_DOC_PIN = "^4.
|
|
27
|
+
export const ZUDO_DOC_PIN = "^4.3.0";
|
|
28
28
|
/**
|
|
29
29
|
* Files in `templates/base/**` that must not be copied by the unconditional
|
|
30
30
|
* base mirror. Each entry is matched against the path relative to
|
|
@@ -590,9 +590,6 @@ function generatePackageJson(choices) {
|
|
|
590
590
|
// compiles. Same pin as host. Caught by W6B (#1735) consumer-build
|
|
591
591
|
// verification.
|
|
592
592
|
"preact-render-to-string": "^6.6.6",
|
|
593
|
-
// Retained until #2742 atomically moves HTML Preview to zfb-md-wasm.
|
|
594
|
-
shiki: "^4.0.2",
|
|
595
|
-
"@shikijs/transformers": "^4.0.0",
|
|
596
593
|
"gray-matter": "^4.0.0",
|
|
597
594
|
mermaid: "^11.12.3",
|
|
598
595
|
"remark-cjk-friendly": "^2.0.1",
|
|
@@ -660,7 +657,7 @@ function generatePackageJson(choices) {
|
|
|
660
657
|
// doc-history helpers, which in turn import
|
|
661
658
|
// @takazudo/zudo-doc-history-server/git-history. Without this dep the
|
|
662
659
|
// plugin host fails at init with ERR_MODULE_NOT_FOUND — W8A (#1739).
|
|
663
|
-
deps["@takazudo/zudo-doc-history-server"] = "^4.
|
|
660
|
+
deps["@takazudo/zudo-doc-history-server"] = "^4.3.0";
|
|
664
661
|
// tsx is no longer needed here: the relocated package plugin imports the
|
|
665
662
|
// runner directly (no `tsx -e` spawn) since the package ships compiled
|
|
666
663
|
// dist/ — package-first migration #2321 (#2337).
|
package/dist/zfb-config-gen.js
CHANGED
package/package.json
CHANGED
|
@@ -81,6 +81,8 @@ REPO_ROOT="$(git -C "$ROOT_DIR" worktree list | head -1 | awk '{print $1}')"
|
|
|
81
81
|
# worktree root, above) reconstructs the equivalent path there even when
|
|
82
82
|
# running from inside a different worktree.
|
|
83
83
|
PROJECT_PREFIX="$(git -C "$ROOT_DIR" rev-parse --show-prefix)"
|
|
84
|
+
MAIN_PROJECT_DIR="$REPO_ROOT/${PROJECT_PREFIX}"
|
|
85
|
+
MAIN_PROJECT_DIR="${MAIN_PROJECT_DIR%/}"
|
|
84
86
|
REPO_DOCS_DIR="$REPO_ROOT/${PROJECT_PREFIX}src/content/docs"
|
|
85
87
|
REPO_DOCS_JA_DIR="$REPO_ROOT/${PROJECT_PREFIX}src/content/docs-ja"
|
|
86
88
|
|
|
@@ -142,7 +144,7 @@ fi
|
|
|
142
144
|
# even when the project is nested inside a larger git repo (running `pnpm
|
|
143
145
|
# build` from the outer repo root would otherwise invoke the wrong
|
|
144
146
|
# package.json, #2918).
|
|
145
|
-
VERIFY_STEP="Run \`pnpm build\` from \`$
|
|
147
|
+
VERIFY_STEP="Run \`pnpm build\` from \`$MAIN_PROJECT_DIR\` to confirm the site builds correctly."
|
|
146
148
|
|
|
147
149
|
resolve_targets() {
|
|
148
150
|
case "$TARGET_MODE" in
|
|
@@ -204,7 +206,7 @@ argument-hint: "[-u|--update] [topic keyword, e.g., 'configuration', 'sidebar',
|
|
|
204
206
|
# $PROJECT_NAME Documentation Reference
|
|
205
207
|
|
|
206
208
|
Look up documentation from the $PROJECT_NAME project for $assistant_label.
|
|
207
|
-
Documentation base path: \`src/content/docs\` (relative to the project root: \`$
|
|
209
|
+
Documentation base path: \`src/content/docs\` (relative to the project root: \`$MAIN_PROJECT_DIR\`)
|
|
208
210
|
|
|
209
211
|
## Mode Detection
|
|
210
212
|
|
|
@@ -234,7 +236,7 @@ The user has new information and wants to add or update documentation in this re
|
|
|
234
236
|
the topic. Read them to understand what is already covered.
|
|
235
237
|
3. **Decide create vs update**: If an existing article covers the topic, update
|
|
236
238
|
it. Otherwise, create a new \`.mdx\` file in the appropriate subdirectory.
|
|
237
|
-
4. **Write the content**: Follow the doc-authoring rules in this project's CLAUDE.md (\`$
|
|
239
|
+
4. **Write the content**: Follow the doc-authoring rules in this project's CLAUDE.md (\`$MAIN_PROJECT_DIR/CLAUDE.md\`):
|
|
238
240
|
- Required frontmatter: \`title\` (string). Always set \`sidebar_position\`.
|
|
239
241
|
Optional: \`description\`, \`sidebar_label\`, \`tags\`, etc.
|
|
240
242
|
- Do NOT use \`# h1\` in content — the frontmatter \`title\` renders as h1.
|
package/templates/features/claudeSkills/files/.claude/skills/zudo-doc-design-system/SKILL.md
CHANGED
|
@@ -53,6 +53,10 @@ Read ONLY the section relevant to your task. Apply its rules strictly.
|
|
|
53
53
|
- **NEVER** use hardcoded hex values in components
|
|
54
54
|
- Both bundled schemes (`Default Light`, `Default Dark`) share the same ramps; only their per-mode wiring (`map`) differs. This project doesn't own a copy of the ramp/map definitions — they're package-owned, shipped compiled under `node_modules/@takazudo/zudo-doc/dist/color-schemes-defaults/`. Only override the `@theme` tokens you actually need to change, in `src/styles/global.css`
|
|
55
55
|
|
|
56
|
+
### Palette index convention
|
|
57
|
+
|
|
58
|
+
Within Tier 1, the `base` and `accent` ramps are addressed by a plain numeric index — `0` is always the lightest stop, climbing toward the darkest (`base` runs `0`-`4`, `accent` runs `0`-`2`). The `state` ramp breaks this pattern on purpose: its four roles (`danger`, `success`, `warning`, `info`) are addressed by name, never by index, since a numeric position is meaningless for a role that isn't part of a light-to-dark progression. When a new ramp is ever introduced, keep this split — a tonal progression gets an index, a set of standalone semantic roles gets names.
|
|
59
|
+
|
|
56
60
|
### Search & highlight tokens (role-split)
|
|
57
61
|
|
|
58
62
|
Highlight roles are deliberately split across dedicated semantic tokens — do **not** share one token across unrelated highlight UIs.
|
|
@@ -118,7 +118,13 @@ Unlike a per-version file, a scaffolded changelog is a single `index.mdx` page.
|
|
|
118
118
|
release as a section **above** the existing ones (newest first), using only the categories that
|
|
119
119
|
have entries.
|
|
120
120
|
|
|
121
|
-
###
|
|
121
|
+
### Default-language changelog (`src/content/docs/changelog/index.mdx`)
|
|
122
|
+
|
|
123
|
+
This is the project's PRIMARY changelog page. It was seeded in whichever language the project's
|
|
124
|
+
`defaultLang` setting is, so use whichever heading set below already matches the page — don't
|
|
125
|
+
assume English.
|
|
126
|
+
|
|
127
|
+
**If the page uses English headings:**
|
|
122
128
|
|
|
123
129
|
```mdx
|
|
124
130
|
## {NEW_VERSION}
|
|
@@ -143,9 +149,7 @@ have entries.
|
|
|
143
149
|
On the very first bump, the page still has the scaffold's starter `## Unreleased` section —
|
|
144
150
|
replace that heading with `## {NEW_VERSION}` rather than adding a second heading.
|
|
145
151
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
Only applies when i18n is enabled (the `docs-ja` directory exists). If it doesn't, skip this file.
|
|
152
|
+
**If the page uses Japanese headings:**
|
|
149
153
|
|
|
150
154
|
```mdx
|
|
151
155
|
## {NEW_VERSION}
|
|
@@ -167,7 +171,21 @@ Only applies when i18n is enabled (the `docs-ja` directory exists). If it doesn'
|
|
|
167
171
|
- Description (commit-hash)
|
|
168
172
|
```
|
|
169
173
|
|
|
170
|
-
On the first bump,
|
|
174
|
+
On the very first bump, the page still has the scaffold's starter `## 未リリース` section —
|
|
175
|
+
replace that heading with `## {NEW_VERSION}` the same way.
|
|
176
|
+
|
|
177
|
+
### Other-locale changelog
|
|
178
|
+
|
|
179
|
+
Only applies when i18n is enabled — i.e. a second content directory exists alongside the primary
|
|
180
|
+
one. Which locale that is depends on the project's `defaultLang`: for an English-default project
|
|
181
|
+
this is the Japanese changelog at `src/content/docs-ja/changelog/index.mdx`; for a
|
|
182
|
+
Japanese-default project this is the English changelog under the `docs-en` directory instead. If
|
|
183
|
+
the other-locale changelog page doesn't exist, skip this file.
|
|
184
|
+
|
|
185
|
+
Use the OTHER heading set from above (the one you didn't use for the default-language page —
|
|
186
|
+
English primary means Japanese secondary, and vice versa), following the same "add a new
|
|
187
|
+
`## {NEW_VERSION}` section above the existing ones" rule, and replace that page's own starter
|
|
188
|
+
heading on the very first bump.
|
|
171
189
|
|
|
172
190
|
Rules:
|
|
173
191
|
|