diff --git a/lib/get-files.js b/lib/get-files.js index 1703530..d067891 100644 --- a/lib/get-files.js +++ b/lib/get-files.js @@ -53,6 +53,12 @@ export default async function getFiles (path, pkg) { const ignoredFilter = (ignored) => (file) => { return !ignored.some((test) => { + // test that the target file is not under + // an ignored directory + const dir = test + '/'; + if (file.substr(0, dir.length) === dir) return true; + + // if not match wildcards return minimatch(file, test); }); };