yargs-file-commands 0.0.6 → 0.0.7
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.
|
@@ -22,10 +22,16 @@ export const scanDirectory = async (dirPath, options = {}) => {
|
|
|
22
22
|
// Check if path should be ignored
|
|
23
23
|
const shouldIgnore = ignorePatterns.some((pattern) => pattern.test(dirPath));
|
|
24
24
|
if (shouldIgnore) {
|
|
25
|
+
if (logLevel === 'debug') {
|
|
26
|
+
console.debug(`Ignoring directory because of ignorePatterns match: ${rootedDirPath}`);
|
|
27
|
+
}
|
|
25
28
|
return [];
|
|
26
29
|
}
|
|
27
30
|
try {
|
|
28
31
|
const entries = await readdir(dirPath);
|
|
32
|
+
if (logLevel === 'debug') {
|
|
33
|
+
console.log(`Found ${entries.length} items in current directory`);
|
|
34
|
+
}
|
|
29
35
|
const nestedFilesPromises = entries.map(async (entry) => {
|
|
30
36
|
const fullPath = join(dirPath, entry);
|
|
31
37
|
// apply ignore pattern and early return if matched
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yargs-file-commands",
|
|
3
3
|
"description": "A yargs helper function that lets you define your commands structure via directory and file naming conventions.",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.7",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|