Skip to content

Commit

Permalink
Review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jridgewell committed Mar 30, 2021
1 parent 63b476d commit 30de1bc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ declare namespace globby {

/**
Glob pattern to look for ignore files, which are then used to ignore globbed files.
This value is unused if gitignore option is used, since gitignore takes precedence.
@default undefined
*/
Expand Down
4 changes: 1 addition & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@ module.exports.stream = (patterns, options) => {
const filterStream = new FilterStream(p => !filter(p));
const uniqueStream = new UniqueStream();

return merge2(
tasks.map(task => fastGlob.stream(task.pattern, task.options))
)
return merge2(tasks.map(task => fastGlob.stream(task.pattern, task.options)))
.pipe(filterStream)
.pipe(uniqueStream);
};
Expand Down
11 changes: 9 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Based on [`fast-glob`](https://github.com/mrmlnc/fast-glob) but adds a bunch of
- Multiple patterns
- Negated patterns: `['foo*', '!foobar']`
- Expands directories: `foo``foo/**/*`
- Supports `.gitignore`
- Supports `.gitignore`, or any similar ignore file system.

## Install

Expand Down Expand Up @@ -87,7 +87,14 @@ Note that if you set this option to `false`, you won't get back matched director
Type: `boolean`\
Default: `false`

Respect ignore patterns in `.gitignore` files that apply to the globbed files.
Respect ignore patterns in `.gitignore` files that apply to the globbed files. This option takes precedence over the `ignoreFiles` option, and explicitly looks for files using a `**/.gitignore` glob.

##### ignoreFiles

Type: `string`\
Default: `undefined`

A glob pattern to look for ignore files, which are then used to ignore globbed files. This is a more generic form of the `gitignore` option, allowing you to find ignore files with a [compatible syntax](http://git-scm.com/docs/gitignore). For instance, this is works with Babel's `.babelignore`, Prettier's `.prettierignore`, or ESLint's `.eslintignore` files.

### globby.sync(patterns, options?)

Expand Down

0 comments on commit 30de1bc

Please sign in to comment.