Skip to main content

getCustomDoc

Callable

  • getCustomDoc(directory: string): (filePath: string) => Promise<undefined | CustomDoc>

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

    @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');