xcraft-core-utils 4.3.1 → 4.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/modules.js +11 -3
- package/package.json +1 -1
package/lib/modules.js
CHANGED
|
@@ -169,9 +169,17 @@ exports.extractAllJs = (libDir, modules) => {
|
|
|
169
169
|
const location = path.join(libDir, mod);
|
|
170
170
|
const files = xFs
|
|
171
171
|
.lsall(location, true)
|
|
172
|
-
.filter(
|
|
173
|
-
|
|
174
|
-
|
|
172
|
+
.filter((file) => {
|
|
173
|
+
const relativePath = file.substring(location.length + 1);
|
|
174
|
+
const items = relativePath.split(path.sep);
|
|
175
|
+
if (items.includes('node_modules')) {
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
if (items[0] === 'test' || items[0] === 'species') {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
return true;
|
|
182
|
+
})
|
|
175
183
|
.filter((file) => /\.js$/.test(file));
|
|
176
184
|
list = list.concat(files);
|
|
177
185
|
});
|