Gathering detailed insights and metrics for gulp-ignore
Gathering detailed insights and metrics for gulp-ignore
Gathering detailed insights and metrics for gulp-ignore
Gathering detailed insights and metrics for gulp-ignore
plugin for gulp to ignore files in the stream based on file characteristics
npm install gulp-ignore
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
120 Stars
20 Commits
9 Forks
4 Watchers
1 Branches
3 Contributors
Updated on Apr 19, 2025
Latest Version
3.0.0
Package Id
gulp-ignore@3.0.0
Size
8.49 kB
NPM Version
6.9.2
Node Version
12.5.0
Published on
Jul 18, 2019
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
Include or exclude gulp files from the stream based on a condition
Usage
1: Exclude things from the stream
Exclude things from entering the stream
1var uglify = require('gulp-uglify'); 2 3gulp.task('task', function() { 4 gulp.src(['./**/*.js', '!./node_modules/**']) 5 .pipe(uglify()) 6 .pipe(gulp.dest('./dist/')); 7});
Grab all JavaScript files that aren't in the node_modules folder, uglify them, and write them.
This is fastest because nothing in node_modules ever leaves gulp.src()
2: Remove things from the stream
Remove from here on
1var gulpIgnore = require('gulp-ignore'); 2var uglify = require('gulp-uglify'); 3var jshint = require('gulp-jshint'); 4 5var condition = './gulpfile.js'; 6 7gulp.task('task', function() { 8 gulp.src('./**/*.js') 9 .pipe(jshint()) 10 .pipe(gulpIgnore.exclude(condition)) 11 .pipe(uglify()) 12 .pipe(gulp.dest('./dist/')); 13});
Run JSHint on everything, remove gulpfile from the stream, then uglify and write everything else.
3: Filter only matching things
Include from here on
1var gulpIgnore = require('gulp-ignore'); 2var uglify = require('gulp-uglify'); 3var jshint = require('gulp-jshint'); 4 5var condition = './public/**.js'; 6 7gulp.task('task', function() { 8 gulp.src('./**/*.js') 9 .pipe(jshint()) 10 .pipe(gulpIgnore.include(condition)) 11 .pipe(uglify()) 12 .pipe(gulp.dest('./dist/')); 13});
Run JSHint on everything, filter to include only files from in the public folder, then uglify and write them.
4: Conditionally filter content, include everything down-stream
Condition
1var gulpif = require('gulp-if'); // This is gulp-if, not gulp-ignore 2var uglify = require('gulp-uglify'); 3 4var condition = function(file) { 5 // Only files whose contents match a pattern 6 return /a pattern/g.test(String(file.contents)); 7}; 8 9gulp.task('task', function() { 10 gulp.src('./src/*.js') 11 .pipe(gulpif(condition, uglify())) 12 .pipe(gulp.dest('./dist/')); 13});
Only uglify the content if the condition is true, but send all the files to the dist folder.
Exclude files whose file.path
matches, include everything else
Include files whose file.path
matches, exclude everything else
Type: boolean
or stat
object or function
that takes in a vinyl file and returns a boolean or RegularExpression
that works on the file.path
The condition parameter is any of the conditions supported by gulp-match. The file.path
is passed into gulp-match
.
If a function is given, then the function is passed a vinyl file
. The function should return a boolean
.
Optional, if it's a glob condition, these options are passed to https://github.com/isaacs/minimatch.
(MIT License)
Copyright (c) 2014 Richardson & Sons, LLC
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 2/19 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More