Function getStorybookFiles

  • Recursively look for files in a provided directory that include a pattern, .stories.ts by default. Could be done easily with the glob library, but this is simple enough to keep locally maintained. See setStorybookFiles for use inside setupNodeEvents

    Parameters

    • dir: string
    • storyPattern: string | RegExp = ...

    Returns string[]