https://github.com/sboudrias/gulp-exclude-gitignore
Gulp plugin to exclude file contained in .gitignore from the stream
https://github.com/sboudrias/gulp-exclude-gitignore
Last synced: 8 months ago
JSON representation
Gulp plugin to exclude file contained in .gitignore from the stream
- Host: GitHub
- URL: https://github.com/sboudrias/gulp-exclude-gitignore
- Owner: SBoudrias
- License: isc
- Created: 2015-07-14T05:33:02.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-06-03T08:51:14.000Z (over 5 years ago)
- Last Synced: 2025-02-27T17:19:14.585Z (8 months ago)
- Language: JavaScript
- Size: 104 KB
- Stars: 27
- Watchers: 5
- Forks: 3
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gulp-exclude-gitignore [![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-image]][daviddm-url] [![Coverage percentage][coveralls-image]][coveralls-url]
Ever find yourself in a situation where you want to run a gulp plugin against every JavaScript file in your project? You do so, but then it start throwing at all your `node_modules`?
The usual fix is to add negative glob patterns to your `gulp.src()` call. Doesn't this feel verbose and tedious? There is a better way! You already have this list inside your `.gitignore` file, let's just use it.
## Install
```sh
$ npm install --save-dev gulp-exclude-gitignore
```
## Usage
```js
var excludeGitignore = require('gulp-exclude-gitignore');
gulp.src('**/*.js')
.pipe(excludeGitignore())
.pipe(jshint());
```
## API
### excludeGitignore(gitignorePath)
#### `gitignorePath` String
If this option is present, it gives the path to the git ignore file. By default this option is set to `.gitignore`.
## License
ISC © [Simon Boudrias](http://simonboudrias.com)
[npm-image]: https://badge.fury.io/js/gulp-exclude-gitignore.svg
[npm-url]: https://npmjs.org/package/gulp-exclude-gitignore
[travis-image]: https://travis-ci.org/SBoudrias/gulp-exclude-gitignore.svg?branch=master
[travis-url]: https://travis-ci.org/SBoudrias/gulp-exclude-gitignore
[daviddm-image]: https://david-dm.org/SBoudrias/gulp-exclude-gitignore.svg?theme=shields.io
[daviddm-url]: https://david-dm.org/SBoudrias/gulp-exclude-gitignore
[coveralls-image]: https://coveralls.io/repos/SBoudrias/gulp-exclude-gitignore/badge.svg
[coveralls-url]: https://coveralls.io/r/SBoudrias/gulp-exclude-gitignore