gulp-main-bower-files
Advanced tools
Comparing version 1.1.1 to 1.1.2
15
index.js
@@ -21,2 +21,17 @@ /** | ||
if (file.isBuffer()) { | ||
if (typeof filter === 'function') { | ||
callback = filter; | ||
opts = null; | ||
filter = null; | ||
} else if (typeof filter !== 'string' && Array.isArray(filter) === false) { | ||
if (typeof opts === 'function') { | ||
callback = opts; | ||
} | ||
opts = filter; | ||
filter = null; | ||
} else if (typeof opts === 'function') { | ||
callback = opts; | ||
opts = null; | ||
} | ||
opts = opts || {}; | ||
@@ -23,0 +38,0 @@ opts.filter = filter; |
{ | ||
"name": "gulp-main-bower-files", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Use main-bower-files in a more gulp like way.", | ||
@@ -34,2 +34,3 @@ "main": "index.js", | ||
"gulp-debug": "^2.0.1", | ||
"gulp-mocha": "^2.1.1", | ||
"mocha": "^2.2.5", | ||
@@ -36,0 +37,0 @@ "stream-assert": "^2.0.2" |
# gulp-main-bower-files | ||
================ | ||
![Dependency Status](https://david-dm.org/mauricedb/gulp-main-bower-files.svg) | ||
[![Dependency Status](https://david-dm.org/mauricedb/gulp-main-bower-files.svg)](https://david-dm.org/mauricedb/gulp-main-bower-files) | ||
[![Build Status](https://travis-ci.org/mauricedb/gulp-main-bower-files.svg?branch=master)](https://travis-ci.org/mauricedb/gulp-main-bower-files) | ||
@@ -6,0 +6,0 @@ |
@@ -41,3 +41,29 @@ /** | ||
}); | ||
it('can override main files with filter', function (done) { | ||
gulp.src(__dirname + '/no-bowerrc/bower-simple-multi.json') | ||
.pipe(mainBowerFiles('**/*.*', { | ||
overrides: { | ||
multi: { | ||
main: ['*.js', '*.css'] | ||
} | ||
} | ||
})) | ||
.pipe(streamAssert.length(4)) | ||
.pipe(streamAssert.end(done)); | ||
}); | ||
it('can override main files without filter', function (done) { | ||
gulp.src(__dirname + '/no-bowerrc/bower-simple-multi.json') | ||
.pipe(mainBowerFiles({ | ||
overrides: { | ||
multi: { | ||
main: ['*.js', '*.css'] | ||
} | ||
} | ||
})) | ||
.pipe(streamAssert.length(4)) | ||
.pipe(streamAssert.end(done)); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
65251
33
330
0
5