$ npm install gulp-gitignore
Exlude files defined on .gitignore from the stream
$ npm install --save-dev gulp-gitignore
var gulp = require('gulp');
var gitignore = require('gulp-gitignore');
gulp.task('default', function () {
return gulp.src('src/**/*')
// exclude files defined in .gitignore
.pipe(gitignore())
.pipe(gulp.dest('dist'));
});
Type: string
Default: .gitignore
The .gitignore
file.
Type: array
You can optionally pass an additional array of patterns to exlude from the stream.
gitignore('.gitignore', ['foo', 'bar']);
Type: object
Type: boolean
Default: false
Matches files prefixed with a dot (eg. .DS_Store
).
MIT © Thomas Lebeau
© 2010 - cnpmjs.org x YWFE | Home | YWFE