From fec20dd9936ea5bbf77a46d5b59eac02a7971bc0 Mon Sep 17 00:00:00 2001 From: Leonardo Balter Date: Mon, 18 Jul 2016 18:21:16 -0300 Subject: [PATCH] Skip folders --- lib/globber.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/globber.js b/lib/globber.js index 87dc2b8..0b0113b 100644 --- a/lib/globber.js +++ b/lib/globber.js @@ -6,11 +6,12 @@ function globber(paths) { const files = new Rx.Subject(); files.fileEvents = []; - const Glob = glob.Glob; let doneCount = 0; paths.forEach(function (path) { - const fileEvents = new Glob(path); + const fileEvents = new glob.Glob(path, { + nodir: true + }); fileEvents.on('match', function (file) { files.onNext(file); @@ -23,7 +24,7 @@ function globber(paths) { }); files.fileEvents.push(fileEvents); - }) + }); return files; }