zudo-doc

Type to search...

to open search from anywhere

/packages/create-zudo-doc/CLAUDE.md

CLAUDE.md at /packages/create-zudo-doc/CLAUDE.md

Path: packages/create-zudo-doc/CLAUDE.md

create-zudo-doc

CLI scaffold tool for creating new zudo-doc documentation sites. Generates a project with configurable features, color schemes, and i18n support.

Key Files

FileRole
src/scaffold.tsCopies template from main project, generates package.json with appropriate dependencies
src/strip.tsRemoves files, imports, and code for disabled features
src/settings-gen.tsGenerates src/config/settings.ts with user-chosen options
src/constants.tsFeature definitions, color scheme lists, light-dark pairings
src/cli.tsCLI argument parsing (commander)
src/api.tsProgrammatic API (createZudoDoc())
src/prompts.tsInteractive prompts (inquirer)
src/index.tsEntry point

Testing

Unit tests

pnpm test

Runs vitest tests in src/__tests__/.

Generator CLI integration tests

Two Claude Code skills test the full scaffold-build-run cycle:

  • /l-generator-cli-tester <pattern> — Test a single generation pattern
  • /l-run-generator-cli-whole-test — Run all 9 patterns, fix bugs, verify everything

Test patterns

PatternDescription
bareboneEverything OFF — minimal project
searchOnly search enabled
i18nOnly i18n enabled
sidebar-filterOnly sidebar filter enabled
claude-resourcesOnly Claude Resources enabled
color-tweak-panelOnly color tweak panel enabled (API only, no CLI flag)
light-darkLight-dark color scheme mode
lang-jaJapanese as default language
all-featuresEverything ON

Always rebuild the CLI before testing:

pnpm build

Adding a New Feature

When adding a feature to the main zudo-doc project that the generator should support:

  1. src/scaffold.ts — Add/remove dependencies in generatePackageJson()
  2. src/strip.ts — Add stripping logic for files and imports when the feature is disabled
  3. src/settings-gen.ts — Add the setting field to generated settings.ts
  4. src/constants.ts — Add feature to definitions if needed
  5. src/__tests__/scaffold.test.ts — Update tests

After changes, run /l-sync-create-zudo-doc to verify no drift remains between the main project and the generator.

Revision History

AI Assistant

Ask a question about the documentation.