update and fixes

This commit is contained in:
Daniel Perez Alvarez
2020-05-18 10:01:37 -07:00
committed by Gajus Kuizinas
parent bc314be2a1
commit 5b496536c6
7 changed files with 17 additions and 16 deletions
+3 -3
View File
@@ -72,7 +72,7 @@ const removeIgnoredFiles = (files, ignorePatterns = []) => {
};
export default (directoryPath, options = {}) => {
if (!validateTargetDirectory(directoryPath, {silent: options.silent})) {
if (!validateTargetDirectory(directoryPath, options)) {
return false;
}
@@ -102,7 +102,7 @@ export default (directoryPath, options = {}) => {
return false;
}
if (_.startsWith(fileName, 'index.js')) {
if (_.startsWith(fileName, options.outputFile || 'index.js')) {
return false;
}
@@ -112,7 +112,7 @@ export default (directoryPath, options = {}) => {
return false;
}
if (isDirectory && (!hasIndex(absolutePath) || ignoreDirectories)) {
if (isDirectory && (!hasIndex(absolutePath, options) || ignoreDirectories)) {
return false;
}