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.
Parameters
Section titled “Parameters”options
Section titled “options”RunAddPatternCommandOptions
Command options for the pattern scaffold workflow.
Returns
Section titled “Returns”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.
Throws
Section titled “Throws”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.