gabotechs / dep-tree

Tool for helping developers keep their code bases clean and decoupled. It allows visualising a code base complexity using a 3d force-directed graph of files and the dependencies between them.
https://github.com/gabotechs/dep-tree
MIT License
1.4k stars 35 forks source link

How to run the command with config file? #73

Closed qcgm1978 closed 4 months ago

qcgm1978 commented 5 months ago

I run the command dep-tree -c .dep-tree.yml but it doesn't work. Prompt me Error: requires at least 1 arg(s), only received 0 What's the key point is I missed?

# .dep-tree.yml
  entrypoints:
    - src/main.js
    - src/renderer.js
gabotechs commented 5 months ago

currently the entrypoints declared in the config file are ignored while rendering the graph, they are just used for the check functionality, so dep-tree is expecting you to pass them as arguments:

dep-tree src/main.js src/renderer.js

It feels inconsistent though, it makes sense that the entrypoints field in .dep-tree.yml is also taken into account for rendering the graph. I will leave this open until/if it's decided that it should work that way.

qcgm1978 commented 5 months ago

Thanks. Now I can run it successfully.

gabotechs commented 4 months ago

entrypoints is now only an attribute inside the check functionality, so the top level entrypoints is no longer supported, now it should be:

check:
  entrypoints:
    - my_entrypoint.file

Closing as no longer relevant