Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update filtering to filter everything coming into the hygiene task
  • Loading branch information
Anthony Dresser
Anthony Dresser committed Nov 28, 2019
commit 1fccc8dc1c07eaa3c1744d05a6238c10c819d0a2
9 changes: 7 additions & 2 deletions build/gulpfile.hygiene.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,12 @@ function hygiene(some) {
let input;

if (Array.isArray(some) || typeof some === 'string' || !some) {
input = vfs.src(some || all, { base: '.', follow: true, allowEmpty: true });
const options = { base: '.', follow: true, allowEmpty: true };
if (some) {
input = vfs.src(some, options).pipe(filter(all)) // split this up to not unnecessarily filter all a second time
} else {
input = vfs.src(all, options);
}
} else {
input = some;
}
Expand Down Expand Up @@ -457,7 +462,7 @@ if (require.main === module) {
console.log('Reading git index versions...');

createGitIndexVinyls(some)
.then(vinyls => new Promise((c, e) => hygiene(es.readArray(vinyls).pipe(filter(all)))
.then(vinyls => new Promise((c, e) => hygiene(es.readArray(vinyls))
.on('end', () => c())
.on('error', e)))
.catch(err => {
Expand Down