Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface RequireDirectoryOptions

Hierarchy

  • RequireDirectoryOptions

Index

Properties

Optional exclude

exclude: RegExp | ((pathToFile: string) => boolean)

Blacklist certain modules.

Optional extensions

extensions: ReadonlyArray<string>

The types of files to look for when requiring command modules.

Optional include

include: RegExp | ((pathToFile: string) => boolean)

Whitelist certain modules

Optional recurse

recurse: undefined | false | true

Look for command modules in all subdirectories and apply them as a flattened (non-hierarchical) list.

Optional visit

visit: undefined | ((commandObject: any, pathToFile?: undefined | string, filename?: undefined | string) => any)

A synchronous function called for each command module encountered. Accepts commandObject, pathToFile, and filename as arguments. Returns commandObject to include the command; any falsy value to exclude/skip it.