Skip to content

runAddPatternCommand

runAddPatternCommand(options): Promise<{ contentFile: string; patternSlug: string; patternScope: "full" | "section"; projectDir: string; sectionRole?: string; tags: string[]; title: string; thumbnailUrl?: string; }>

Defined in: wp-typia-project-tools/src/runtime/add/cli-add-workspace-pattern.ts:58

Add one PHP block pattern shell to an official workspace project.

RunAddPatternCommandOptions

Command options for the pattern scaffold workflow.

Promise<{ contentFile: string; patternSlug: string; patternScope: "full" | "section"; projectDir: string; sectionRole?: string; tags: string[]; title: string; thumbnailUrl?: string; }>

A promise that resolves with the normalized patternSlug, owning projectDir, resolved contentFile, patternScope, tags, title, and optional sectionRole and thumbnailUrl after the pattern file and inventory entry have been written successfully.

When the command is run outside an official workspace, when the pattern slug, scope, section-role coupling, tag values, or content file path are invalid, or when a conflicting target file or inventory entry already exists.