Skip to main content

addCommand

plugin.projectStructure.addCommand(packageId: string, command: Omit<RunCommand, "id">, workspacePath?: string): Promise<ProjectStructureUpdateResponse>

Add a run command to a package

Parameters

ParameterTypeRequiredDescription
packageIdstringYes
commandOmit<RunCommand, "id">Yes
workspacePathstringNo

Returns

Promise<ProjectStructureUpdateResponse>

Example

import plugin from '@codebolt/plugin-sdk';

const result = await plugin.projectStructure.addCommand('packageId', /* Omit<RunCommand, "id"> */);
console.log(result);