@@ -15,28 +15,28 @@ documents:
1515 sourcePaths : src
1616 filePattern : " *.php"
1717 notPath : [ "tests", "vendor" ]
18- showTreeView : true
1918 modifiers : [ "php-signature" ]
2019` ` `
2120
2221## Parameters
2322
24- | Parameter | Type | Default | Description |
25- |----------------------------------|---------------|----------|--------------------------------------------------------------------------|
26- | ` type` | string | required | Must be `"file"` |
27- | `description` | string | `""` | Human-readable description of the source |
28- | `sourcePaths` | string\|array | required | Path(s) to directory or files to include |
29- | `filePattern` | string\|array | `"*.*"` | File pattern(s) to match |
30- | `notPath` (or `excludePatterns`) | array | `[]` | Patterns to exclude files |
31- | `path` | string\|array | `[]` | Patterns to include only files in specific paths |
32- | `contains` | string\|array | `[]` | Patterns to include only files containing specific content |
33- | `notContains` | string\|array | `[]` | Patterns to exclude files containing specific content |
34- | `size` | string\|array | `[]` | Size constraints for files (e.g., `"> 10K"`, `"< 1M"`) |
35- | `date` | string\|array | `[]` | Date constraints for files (e.g., `"since yesterday"`, `"> 2023-01-01"`) |
36- | `ignoreUnreadableDirs` | boolean | `false` | Whether to ignore unreadable directories |
37- | `showTreeView` | boolean | `true` | Whether to display a directory tree visualization |
38- | `modifiers` | array | `[]` | Content modifiers to apply |
39- | `tags` | array | [] | List of tags for this source |
23+ | Parameter | Type | Default | Description |
24+ |----------------------------------|-----------------|----------|----------------------------------------------------------------------------------------|
25+ | ` type` | string | required | Must be `"file"` |
26+ | `description` | string | `""` | Human-readable description of the source |
27+ | `sourcePaths` | string\|array | required | Path(s) to directory or files to include |
28+ | `filePattern` | string\|array | `"*.*"` | File pattern(s) to match |
29+ | `notPath` (or `excludePatterns`) | array | `[]` | Patterns to exclude files |
30+ | `path` | string\|array | `[]` | Patterns to include only files in specific paths |
31+ | `contains` | string\|array | `[]` | Patterns to include only files containing specific content |
32+ | `notContains` | string\|array | `[]` | Patterns to exclude files containing specific content |
33+ | `size` | string\|array | `[]` | Size constraints for files (e.g., `"> 10K"`, `"< 1M"`) |
34+ | `date` | string\|array | `[]` | Date constraints for files (e.g., `"since yesterday"`, `"> 2023-01-01"`) |
35+ | `ignoreUnreadableDirs` | boolean | `false` | Whether to ignore unreadable directories |
36+ | `showTreeView` | boolean | `true` | Whether to display a directory tree visualization (deprecated, use `treeView` instead) |
37+ | `treeView` | boolean\|object | `true` | Tree view configuration, can be a boolean or detailed configuration object |
38+ | `modifiers` | array | `[]` | Content modifiers to apply |
39+ | `tags` | array | [] | List of tags for this source |
4040
4141# # Multiple Source Paths
4242
@@ -248,4 +248,70 @@ This will:
2482486. Only include files modified in the last month
2492497. Skip directories that can't be read due to permissions
2502508. Show a directory tree in the output
251- 9. Apply the PHP signature modifier to simplify method implementations
251+ 9. Apply the PHP signature modifier to simplify method implementations
252+
253+ # # Tree View Configuration
254+
255+ You can customize the tree view with detailed configuration options :
256+
257+ ` ` ` yaml
258+ documents:
259+ - description: "Enhanced Tree View Example"
260+ outputPath: "docs/enhanced-tree.md"
261+ sources:
262+ - type: file
263+ description: "Files with Enhanced Tree View"
264+ sourcePaths: src
265+ filePattern: "*.php"
266+ treeView:
267+ enabled: true
268+ showSize: true
269+ showLastModified: true
270+ showCharCount: true
271+ includeFiles: true
272+ maxDepth: 3
273+ dirContext:
274+ "src/Controller": "Application controllers"
275+ "src/Models": "Domain models and entities"
276+ ` ` `
277+
278+ # ## Tree View Options
279+
280+ | Option | Type | Default | Description |
281+ |--------------------|---------|---------|------------------------------------------------------------------|
282+ | `enabled` | boolean | `true` | Whether to show the tree view |
283+ | `showSize` | boolean | `false` | Include file/directory sizes in the tree |
284+ | `showLastModified` | boolean | `false` | Include last modified dates in the tree |
285+ | `showCharCount` | boolean | `false` | Include character counts in the tree |
286+ | `includeFiles` | boolean | `true` | Whether to include files (true) or only show directories (false) |
287+ | `maxDepth` | integer | `0` | Maximum depth of the tree to display (0 for unlimited) |
288+ | `dirContext` | object | `{}` | Optional descriptions for specific directories |
289+
290+ Example output with enhanced tree view :
291+
292+ ` ` `
293+ Project
294+ ├── src/ [4.2 MB, 2024-03-12, 25,483 chars]
295+ │ ├── Controller/ [756 KB, 2024-03-10, 7,521 chars] # Application controllers
296+ │ │ ├── ApiController.php [328 KB, 2024-03-10, 3,845 chars]
297+ │ │ └── WebController.php [428 KB, 2024-03-05, 3,676 chars]
298+ │ ├── Models/ [1.2 MB, 2024-03-12, 12,345 chars] # Domain models and entities
299+ │ │ ├── User.php [128 KB, 2024-03-05, 1,234 chars]
300+ │ │ └── Product.php [96 KB, 2024-03-12, 987 chars]
301+ ` ` `
302+
303+ # ## Simple Boolean Usage
304+
305+ For backward compatibility, you can still use a boolean value :
306+
307+ ` ` ` yaml
308+ documents:
309+ - description: "Simple Tree View Example"
310+ outputPath: "docs/simple-tree.md"
311+ sources:
312+ - type: file
313+ description: "Files with Simple Tree View"
314+ sourcePaths: src
315+ filePattern: "*.php"
316+ treeView: false # Disable tree view
317+ ` ` `
0 commit comments