dirs(glob, callback)

Filters out directories using glob. By default all the directories will be found.

When iterating over directories - new current working directory context is set. It means that all the commands executed inside callback will be executed in the context of the directory.

Parameters

glob
string | readonly string[]

Accepts string and template literals. You can space or comma-separate multiple globs.

callback
(subcommands: Subcommands) => Promise<void> | void

A callback which will be executed for each directory. First argument is an object with subcommands. It can be destructured to get access to subcommands.

Returns