ng-di-graph 0.3.0 → 0.4.1
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/README.md +15 -7
- package/dist/cli/index.cjs +285 -138
- package/dist/cli/index.cjs.map +1 -1
- package/dist/core/graph-filter.d.ts +3 -1
- package/dist/core/parser.d.ts +7 -0
- package/dist/types/index.d.ts +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,8 +34,8 @@ npm install -g ng-di-graph
|
|
|
34
34
|
## Usage
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
#
|
|
38
|
-
ng-di-graph
|
|
37
|
+
# Target specific files without the --files flag (positional shortcut)
|
|
38
|
+
ng-di-graph src/app/app.component.ts --project ./tsconfig.json --format json
|
|
39
39
|
|
|
40
40
|
# Analyze an Angular project and output JSON
|
|
41
41
|
ng-di-graph --project ./my-angular-app/tsconfig.json --format json
|
|
@@ -46,6 +46,9 @@ ng-di-graph --project ./tsconfig.json --format mermaid --out graph.mmd
|
|
|
46
46
|
# Analyze dependencies of a specific component
|
|
47
47
|
ng-di-graph --project ./tsconfig.json --entry AppComponent --format mermaid
|
|
48
48
|
|
|
49
|
+
# Focus on a specific file (similar to eslint targets)
|
|
50
|
+
ng-di-graph --project ./tsconfig.json --files src/app/app.component.ts
|
|
51
|
+
|
|
49
52
|
# Show verbose logging with detailed type resolution
|
|
50
53
|
ng-di-graph --project ./tsconfig.json --verbose
|
|
51
54
|
|
|
@@ -59,13 +62,14 @@ ng-di-graph --project ./tsconfig.json --entry UserService --direction upstream
|
|
|
59
62
|
## CLI Reference
|
|
60
63
|
|
|
61
64
|
```
|
|
62
|
-
ng-di-graph [
|
|
65
|
+
ng-di-graph [filePaths...] [options]
|
|
63
66
|
|
|
64
67
|
Arguments:
|
|
65
|
-
|
|
68
|
+
filePaths Optional list of files/directories to analyze (alias for --files)
|
|
66
69
|
|
|
67
70
|
Options:
|
|
68
71
|
-p, --project <path> Path to tsconfig.json (default: ./tsconfig.json)
|
|
72
|
+
--files <paths...> Specific file paths to analyze (similar to eslint targets)
|
|
69
73
|
-f, --format <format> Output format: json | mermaid (default: json)
|
|
70
74
|
-e, --entry <symbol...> Starting nodes for sub-graph filtering
|
|
71
75
|
-d, --direction <dir> Filter direction: upstream | downstream | both (default: downstream)
|
|
@@ -77,9 +81,13 @@ Options:
|
|
|
77
81
|
|
|
78
82
|
### Option Details
|
|
79
83
|
|
|
80
|
-
- **`
|
|
81
|
-
|
|
82
|
-
- **`--project`**: Specifies the TypeScript configuration file to use for project analysis
|
|
84
|
+
- **`filePaths` (positional)**: Optional positional arguments that act as a shortcut for `--files`,
|
|
85
|
+
allowing you to target specific files or directories without the flag; omit to scan the full project
|
|
86
|
+
- **`--project`**: Specifies the TypeScript configuration file to use for project analysis (required
|
|
87
|
+
when your tsconfig lives outside `./tsconfig.json`)
|
|
88
|
+
- **`--files`**: Restrict analysis to one or more specific TypeScript files (relative paths supported)
|
|
89
|
+
and merges with positional `filePaths` when both are provided; useful when targeting a subset of your
|
|
90
|
+
project similar to ESLint CLI usage
|
|
83
91
|
- **`--format`**: Choose between JSON (structured data) or Mermaid (visual diagram)
|
|
84
92
|
- **`--entry`**: Filter the graph to show only dependencies related to specified symbols (supports multiple entries)
|
|
85
93
|
- **`--direction`**:
|