Skip to content

Config

Defined in: packages/core/src/types.ts:605

Screenbook configuration options.

optional adoption: AdoptionConfig

Defined in: packages/core/src/types.ts:660

Progressive adoption configuration for gradual rollout

{ mode: "progressive", includePatterns: ["src/pages/billing/**"], minimumCoverage: 80 }

optional apiIntegration: ApiIntegrationConfig

Defined in: packages/core/src/types.ts:667

API integration configuration for auto-detecting dependencies from OpenAPI-generated clients (Orval, openapi-typescript, etc.)

{ clientPackages: ["@/api/generated"] }

optional excludePatterns: string[]

Defined in: packages/core/src/types.ts:654

Patterns to exclude from route detection. Directories matching these patterns are ignored when checking for screen.meta.ts. Useful for excluding component directories like “components/”, “hooks/”, etc.

https://github.com/wadakatu/screenbook/issues/190


optional generate: GenerateConfig

Defined in: packages/core/src/types.ts:679

Configuration for screen ID generation in the generate command

{ smartParameterNaming: true }

ignore: string[]

Defined in: packages/core/src/types.ts:646

Patterns to ignore when scanning (glob patterns). Defaults to node_modules and .git directories.


optional lint: LintConfig

Defined in: packages/core/src/types.ts:673

Lint configuration for controlling warning behavior

{ orphans: "off" }

metaPattern: string

Defined in: packages/core/src/types.ts:621

Glob pattern for screen metadata files. Supports colocation: place screen.meta.ts alongside your route files.

"src/**/screen.meta.ts"
"src/**/screen.meta.ts"
"app/**/screen.meta.ts"

outDir: string

Defined in: packages/core/src/types.ts:612

Output directory for generated files

".screenbook"
".screenbook"
"dist/screenbook"

optional routesFile: string

Defined in: packages/core/src/types.ts:640

Path to a router configuration file (for config-based routing). Use this for frameworks like Vue Router, React Router, etc. Cannot be used together with routesPattern.

"src/router/routes.ts"
"src/router/index.ts"

optional routesPattern: string

Defined in: packages/core/src/types.ts:631

Glob pattern for route files (for generate/lint commands). Use this for file-based routing frameworks (Next.js, Nuxt, Remix, etc.). Cannot be used together with routesFile.

"src/pages/**/page.tsx"
"app/**/page.tsx"
"src/routes/**/*.tsx"