# glob-fs-gitignore

> glob-fs middleware for automatically ignoring files specified in `.gitignore`

Latest version **0.1.6** (published 2017-05-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install glob-fs-gitignore
pnpm add glob-fs-gitignore
yarn add glob-fs-gitignore
bun add glob-fs-gitignore
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.6 |
| Published | 2017-05-11 |
| First published | 2015-07-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.12.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Jon Schlinkert |
| Maintainers | jonschlinkert |
| Keywords | fs, gitignore, glob, glob-fs, ignore, middleware, parse, pattern, patterns |

## Links

- npm: https://www.npmjs.com/package/glob-fs-gitignore
- Repository: https://github.com/jonschlinkert/glob-fs-gitignore
- Issues: https://github.com/jonschlinkert/glob-fs-gitignore/issues
- npm.io page: https://npm.io/package/glob-fs-gitignore

## Dependencies (3)

- [micromatch](https://npm.io/package/micromatch.md) ^2.3.11
- [findup-sync](https://npm.io/package/findup-sync.md) ^1.0.0
- [parse-gitignore](https://npm.io/package/parse-gitignore.md) ^0.2.0

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 0.1.6 (latest) — 2017-05-11
- 0.1.5 — 2015-07-11
- 0.1.4 — 2015-07-11
- 0.1.3 — 2015-07-09
- 0.1.2 — 2015-07-09
- 0.1.1 — 2015-07-09
- 0.1.0 — 2015-07-07

## README

# glob-fs-gitignore [![NPM version](https://img.shields.io/npm/v/glob-fs-gitignore.svg?style=flat)](https://www.npmjs.com/package/glob-fs-gitignore) [![NPM monthly downloads](https://img.shields.io/npm/dm/glob-fs-gitignore.svg?style=flat)](https://npmjs.org/package/glob-fs-gitignore) [![NPM total downloads](https://img.shields.io/npm/dt/glob-fs-gitignore.svg?style=flat)](https://npmjs.org/package/glob-fs-gitignore) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/glob-fs-gitignore.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/glob-fs-gitignore)

> glob-fs middleware for automatically ignoring files specified in `.gitignore`

## Install

Install with [npm](https://www.npmjs.com/):

```sh
$ npm install --save glob-fs-gitignore
```

This is currently a built-in middleware with glob-fs, but it can also be used directly if the default middleware stack is disabled.

## Usage

```js
var gitignore = require('glob-fs-gitignore');
```

Middleware is defined the same way with all readdir methods (e.g. `glob.readdir`, `glob.readdirSync`, `glob.readdirStream` and `glob.readdirPromise`):

```js
var glob = require('glob-fs')({ dotfiles: true })
  .use(gitignore()) // <= middleware
  .readdir('*', function (err, files) {
    console.log(files);
  });
```

## About

### Contributing

Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).

### Contributors

| **Commits** | **Contributor** | 
| --- | --- |
| 12 | [jonschlinkert](https://github.com/jonschlinkert) |
| 1 | [StefanLiebenberg](https://github.com/StefanLiebenberg) |

### Building docs

_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_

To generate the readme, run the following command:

```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```

### Running tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

```sh
$ npm install && npm test
```

### Author

**Jon Schlinkert**

* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)

### License

Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).

***

_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on May 11, 2017._

---
_Source: https://npm.io/package/glob-fs-gitignore · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
