Skip to main content

Function: getCustomDoc()

getCustomDoc(directory): (filePath) => Promise<CustomDoc>

Defined in: custom-docs.ts:24

Returns a custom doc from EventCatalog by the given file path.

Parameters

ParameterType
directorystring

Returns

Function

Parameters

ParameterType
filePathstring

Returns

Promise<CustomDoc>

Example

import utils from '@eventcatalog/utils';

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

// Gets the custom doc by the given file path
const customDoc = await getCustomDoc('/guides/inventory-management.mdx');