|
|
@ -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}`); |
|
|
|