Browse Source

performance improvement

master
Guillermo Rauch 9 years ago
parent
commit
1da771970a
  1. 10
      lib/get-files.js

10
lib/get-files.js

@ -129,15 +129,15 @@ const explode = async function (paths, ignored, { limit, debug }) {
s = await stat(path);
}
if (isIgnored(file, ignored)) {
if (debug) console.log(`> [debug] Ignoring "${file}"`);
return null;
}
if (s.isDirectory()) {
const all = await readdir(file);
return many(all.map(subdir => asAbsolute(subdir, file)));
} else {
if (isIgnored(file, ignored)) {
if (debug) console.log(`> [debug] Ignoring "${file}"`);
return null;
}
if (null != limit && s.size > limit) {
console.error(`> \u001b[31mWarning!\u001b[39m Skipping file ` +
`over ${bytes(limit)}: ${path}`);

Loading…
Cancel
Save