-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature request: easy static site generation from deno_doc #238
Comments
We already have Outside of supporting a specific 3rd party library, how would this be an improvement? |
The benefit would be to show the dependency graph in a visual way in addition to existing ways, resulting in shorter time to understand a package/dependency, analyse and teach it. We declare quite a bit information when we are authoring a file with dependency imports and types, however existing tools today are still limited. Causing libraries being kept at minimum documentation and introducing extra time and mental costs for learning. https://doc.deno.land/ was a good move as in what could be visually displayed & share, inspired by docs.rs and other types of tools however it should also be run locally and offline. A similar and much simpler UI could be built just for dependency graphs, web server can also serve these links as svgs etc if needed for further documentation & offline/online reference use. |
Well Taking the output of the There are already a few community projects that provide graph visualisation capabilities. Notably Deno Visualizer by @danopia. |
I see Thanks for also referring to Deno Visualizer, I'll check to see how difficult is it to run it offline/as a cli tool. Basically I am arguing that this feature and type documentation would be useful. On node.js side I am already using |
It is, and it comes with minimalistic but extensible tools to a) print a module graph (
|
Fortunately you're not the first to have wanted this, so:
My dot text is definitely not intended to be user facing though :D If you have graphviz installed then it can be rendered too: Also note that "Module Visualizer" is intentionally focused on viewing a higher-level graph of modules, e.g. which dependencies have nodes in the tree (vs. which actual files Deno has loaded). This differs from |
I knew summoning @danopia was a good idea! 😁 |
Thank you for your inputs! @danopia I was indeed looking for a cli tool like this. I've run through your example it works for higher-level external dependency graph as a summary. It is also nice that it has the size and the amount of files group under a node.
Pretty soon after I realized this indeed doesn't show internal file based dependency graph which I was expecting as a default. It would be great if I could get internal dependency graph as well, in other words providing a file path instead of a folder path should yield file based graph instead of module based graph:
File has internal module dependencies but only shows a single node when there is no external dependency, which means it doesn't give much information. Current output:
Currently cli always outputs a single node for the project module(internal dependency tree). A better default in this case could be to make this show the actual internal and external dependency tree. Additional flag could be provided to specify the depth of grouping of external and/or internal modules. $ deno-graph test/some_module.ts # shows all files in the graph(including files in external dependencies)
$ deno-graph test/some_module.ts group-by=module # external dependency origin summary + file graph for internal files
$ deno-graph test/some_module.ts group-by=origin # current behavior: group by external dependencies, and a single node for the internal. @kitsonk I'll check to see if I can build the html https://doc.deno.land/ generates offline easily, last year when I checked this was not possible, certain code was not public if I remember correctly. Making this more accessible through a cli would indeed be very useful I think, not only this would make more people use the type documentation, it can also allow for more configuration possibilities in the future like themes or html content customization. |
I have changed the title of this to better reflect what is being requested, which is easy static site generation of documentation from deno_doc, or integrated into deno_doc. |
Closing this as it has been achieved! |
Hi there, I wasn't sure where to post this feature request after checking bunch of places, so I'm posting here hope its not the wrong location 😅
As a user I would like to generate a graphviz .DOT graph and maybe output it to a .dot or .html file of JS/TS dependencies given a file or source code. I think this would be a great documentation tool. In node.js userland I found bunch of projects but best ones are not mature/being developed. I think this would be best achieved in the
deno
cli itself, or maybe an offical and optional tool that could be exposed underdeno
when installed lazily on prompt.Examples:
The text was updated successfully, but these errors were encountered: