gabotechs/dep-tree

Export webpage files

Attempt3035 opened this issue ยท 4 comments

Hey @gabotechs! I'm curious your thoughts on implementing an export function in the cli, which would simply copy the output files to the specified dir rather than a temp folder. I really want to embed 3D graphs of our code bases inside our Docusaurus pages, which should work perfectly if all the generated files can easily be exported to a dir, that way we can add a dep-tree build command into our documentation CI/CD. If you're keen to implement this, I'd be super grateful, happy to help out in any way including updating readme etc, probably a simple quick feature for you to implement knowing the codebase though!

Hey! I think that should be possible now:

dep-tree path/to/entrypoint --no-browser-open --render-path foo.html

This will dump the html output in foo.html without opening it in a browser. Does that work for you?

Damn that works a treat! Thank you so much! ๐Ÿš€๐Ÿš€ Didn't see this in the docs, I'll have a crack editing the readme to add this in if that's okay, if I search the codebase by cmd.Flags() does that have all the extra options or is there other places I should look too?

Not all the CLI options are in the docs, they are discoverable by appending the --help flag in the cli, that will output the available flags with the descriptions. This one is discoverable by:

dep-tree entropy --help

My suggestion is: instead of documenting all the flags one by one in the README.md, let the users know that all the available flags can be displayed by appending the command with a --help flag

Ahh gotcha, I ran -h and thought that was everything, I didn't realise dep-tree -h and --help give different outputs. (but dep-tree entropy -h does display everything) Maybe we could merge these and have it in the docs somewhere, then it should be clear enough ๐Ÿ‘๐Ÿ‘