Skip to main content

Function: removeExampleFromCommand()

removeExampleFromCommand(directory): (id, fileName, version?) => Promise<void>

Defined in: commands.ts:368

Remove an example file from a command.

Parameters​

ParameterType
directorystring

Returns​

Function

Parameters​

ParameterType
idstring
fileNamestring
version?string

Returns​

Promise<void>

Example​

import utils from '@eventcatalog/utils';

const { removeExampleFromCommand } = utils('/path/to/eventcatalog');

await removeExampleFromCommand('UpdateInventory', 'basic.json');
await removeExampleFromCommand('UpdateInventory', 'basic.json', '0.0.1');