If set to true, globby will automatically glob directories for you. If you define an Array it will only glob files that matches the patterns inside the Array. You can also define an Object with files and extensions like below:
Note that if you set this option to false, you won't get back matched directories unless you set nodir: false.
gitignore
Type: boolean
Default: false
Respect ignore patterns in .gitignore files that apply to the globbed files.
globby.sync(patterns, [options])
Returns an Array of matching paths.
globby.generateGlobTasks(patterns, [options])
Returns an Array<Object> in the format {pattern: string, opts: Object}, which can be passed as arguments to fast-glob. This is useful for other globbing-related packages.
Note that you should avoid running the same tasks multiple times as they contain a file system cache. Instead, run this method each time to ensure file system changes are taken into consideration.
globby.hasMagic(patterns, [options])
Returns a boolean of whether there are any special glob characters in the patterns.
Note that the options affect the results. If noext: true is set, then +(a|b) will not be considered a magic pattern. If the pattern has a brace expansion, like a/{b/c,x/y}, then that is considered magical, unless nobrace: true is set.