Closed freemansoft closed 1 year ago
VSCode built the run command for me that runs a graph analysis on a directory.
mermaid
generates reasonable outlet
C:\Users\...\riverpod\packages\riverpod_graph> dart run .\bin\riverpod_graph.dart ..\..\examples\todo\lib
d2
still generates no output
C:\Users\...\riverpod\packages\riverpod_graph> dart run .\bin\riverpod_graph.dart ..\..\examples\todo\lib
launch.json
configuration looks like
{
"name": "riverpod_graph examples/todo d2",
"cwd": "packages/riverpod_graph",
"request": "launch",
"type": "dart",
"program": "bin/riverpod_graph.dart",
"args": [
"../../examples/todo/lib",
"-f",
"d2"
]
},
{
"name": "riverpod_graph examples/todo mermaid",
"cwd": "packages/riverpod_graph",
"request": "launch",
"type": "dart",
"program": "bin/riverpod_graph.dart",
"args": [
"../../examples/todo/lib",
"-f",
"mermaid"
]
},
Will probably do a documentation PR for this.
you must specify the PATH you wish to analyze
riverpod_graph . -f d2
Figured it out. On my Windows machine, the analysis package does not throw an error if the analysis target directory does not exist.
For future notes
This worked for me when operating with just code from the repo and not activate
../riverpod/packages/riverpod_graph$ dart run riverpod_graph:riverpod_graph ../../examples/odos/lib -f d2
This works for me in the VSCode launch.json
. I had the directory as examples/todo
when it actually was examples/todos
.
{
"name": "riverpod_graph examples/todos d2",
"cwd": "packages/riverpod_graph",
"request": "launch",
"type": "dart",
"program": "bin/riverpod_graph.dart",
"args": [
"../../examples/todos/lib",
"-f",
"d2"
]
},
{
"name": "riverpod_graph examples/todos mermaid",
"cwd": "packages/riverpod_graph",
"request": "launch",
"type": "dart",
"program": "bin/riverpod_graph.dart",
"args": [
"../../examples/todos/lib",
"-f",
"mermaid"
]
},
Describe the bug riverpod_graph generates
mermaid
output but notd2 output
To Reproduce The only example I could find for running riverpod_graph was here. It publishes locally from git. I can't figure out how to do this from the local tree.
generate mermaid output - the mermaid markup shows up on stdout.
or
No output at all
Expected behavior I expect there should be d2 output that is an analog to the mermaid js output