You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bbe4c54
Browse filesBrowse the repository at this point in the historyBrowse files
feat: include a folder non-recursively with { path, recursive: false }
includeFolders entries may now be objects, { path: string,
recursive?: boolean }. recursive: false includes only that folder's own
files, so { path: ".", recursive: false } means the project-root files
without the whole tree. Plain string entries keep their recursive
meaning, and an entry that is neither a string nor { path } now throws
a TypeError instead of failing inside path.join.
Overlap handling covers the new form: a non-recursive root is dropped
when the same folder is also listed recursively or lies inside a
recursive root, so every file is still returned once.
The CLI gains a repeatable --include-folder-non-recursive <path> flag
that appends { path, recursive: false } alongside --include-folder.
walkFiles takes a matching recursive option. README, JSDoc and the
generated types document the entry shape.
Refs #59
-`includeFolders?: string[]` - project-relative folders to scan. Overlapping entries are collapsed, so every file is scanned once however the folders nest or are spelled (`"."` next to `"src"`, `"src"` next to `"src/core"`, `"./src"` next to `"src/"`)
97
+
-`includeFolders?: Array<string | { path: string, recursive?: boolean }>` - project-relative folders to scan. A string entry is scanned recursively; `{ path, recursive: false }` includes only that folder's own files (for example `{ path: ".", recursive: false }` for the project-root files without the whole tree). Overlapping entries are collapsed, so every file is scanned once however the folders nest or are spelled (`"."` next to `"src"`, `"src"` next to `"src/core"`, `"./src"` next to `"src/"`)
97
98
-`excludeFolders?: string[]` - folder names or relative paths to exclude
98
99
-`gitignore?: boolean | string | string[]` - respect `.gitignore` during discovery. `false` disables; a path or array of paths loads those ignore files; anything else / omitted auto-detects `<projectRoot>/.gitignore`. Matched files and directories are skipped.
99
100
-`projectName?: string`
@@ -116,7 +117,7 @@ const result = await fixHeaders({
@@ -138,7 +139,7 @@ const result = await fixHeaders({
138
139
## Notes
139
140
140
141
-`excludeFolders` supports both folder-name and nested path matching.
141
-
-`includeFolders` entries never double-count a file. A folder that lies inside another include is not walked a second time; the exception is a folder the outer walk never enters (for example one under `node_modules` or under a root build folder such as `dist`), which keeps being walked on its own because it was named explicitly.
142
+
-`includeFolders` entries never double-count a file. A folder that lies inside another recursive include is not walked a second time; the exception is a folder the outer walk never enters (for example one under `node_modules` or under a root build folder such as `dist`), which keeps being walked on its own because it was named explicitly.
142
143
- Built-in ignores are scoped: `.git` and `node_modules` are skipped at **any depth**, while build/cache directories (`dist`, `build`, `coverage`, `tmp`, `.next`, `.turbo`) are skipped **only at the project root** — so a source directory that happens to share a name (for example `tools/build`) is still processed.
143
144
- With `gitignore` enabled (the default, auto-detecting the project's `.gitignore`), anything the project ignores is skipped during discovery — generated paths are excluded by the project's own rules without hard-coding names. Pass `gitignore: false` to disable, or a path/array to use specific ignore files.
144
145
- For monorepos, each file resolves metadata from the closest detector config in its parent tree.
0 commit comments