Skip to content

runAddBlockCommand

runAddBlockCommand(options): Promise<{ blockSlugs: string[]; projectDir: string; templateId: "interactivity" | "basic" | "persistence" | "compound"; warnings: string[]; }>

Defined in: wp-typia-project-tools/src/runtime/cli-add-block.ts:522

Adds one built-in block slice to an official workspace project.

RunAddBlockCommandOptions

Command options for the built-in workspace block scaffold flow.

Promise<{ blockSlugs: string[]; projectDir: string; templateId: "interactivity" | "basic" | "persistence" | "compound"; warnings: string[]; }>

A promise that resolves with the created block slugs, the owning project directory, and the resolved template id after workspace mutation succeeds.

When the template id is unknown, persistence flags are used with unsupported templates, the command runs outside an official workspace, workspace dependencies have not been installed yet, or target block paths already exist.