We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f87797c commit e2cb027Copy full SHA for e2cb027
lib/modclean.js
@@ -198,8 +198,10 @@ class ModClean extends ModClean_Utils {
198
obj.isDirectory = isDir;
199
200
if(isDir) {
201
- let list = await readdir(obj.fullPath);
202
- if(list.indexOf('package.json') !== -1) obj.isModule = true;
+ let list = await readdir(obj.fullPath),
+ parent = path.basename(path.join(obj.fullPath, '../'));
203
+
204
+ if(list.indexOf('package.json') !== -1 && parent === this.options.modulesDir) obj.isModule = true;
205
}
206
207
obj.stat = stats;
0 commit comments