diff --git a/packages/sample/README.md b/packages/sample/README.md index dcec694..bc1851c 100644 --- a/packages/sample/README.md +++ b/packages/sample/README.md @@ -45,7 +45,7 @@ Config example: "group": [ { "cwd": ".", - "pattern": ["."], + "pattern": ["**/*"], "extensions": ["js", "ts", "..."], "ignore": ["dist"], "title": "示例软件名称", diff --git a/packages/sample/lib/lib/config.mjs b/packages/sample/lib/lib/config.mjs index 7aa0d9e..982bdb9 100644 --- a/packages/sample/lib/lib/config.mjs +++ b/packages/sample/lib/lib/config.mjs @@ -27,7 +27,7 @@ export function mergeConfig(group = [{}]) { title = '示例软件名称', version = 'v1.0', cwd = '.', - pattern = ['.'], + pattern = ['**/*'], ignore = ['dist'], extensions = [ ['js', 'cjs', 'mjs', 'jsx'], diff --git a/packages/sample/lib/lib/picker.mjs b/packages/sample/lib/lib/picker.mjs index 965c230..01395aa 100644 --- a/packages/sample/lib/lib/picker.mjs +++ b/packages/sample/lib/lib/picker.mjs @@ -49,8 +49,17 @@ export function scan(config) { gitignore: true, onlyFiles: true, dot: true, + caseSensitiveMatch: false, expandDirectories: { extensions: config.extensions, }, - }).then((list) => list.sort()); + }) + .then((list) => list.sort()) + .then((list) => { + for (const item of list) { + logger.file(item); + } + + return list; + }); } diff --git a/packages/sample/package.json b/packages/sample/package.json index da2dcac..bb830e9 100644 --- a/packages/sample/package.json +++ b/packages/sample/package.json @@ -1,6 +1,6 @@ { "name": "@bring-it/sample", - "version": "0.4.1", + "version": "0.4.2", "description": "Generate code sample files", "license": "MIT", "author": {