izelnakri / module-visualizer

Interactive tools to explore ESM dependencies for any module which uses 'import' statements with URLs.

Home Page:https://deno-visualizer.danopia.net/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deno Module Visualizer

Live @ https://deno-visualizer.danopia.net

/dependencies-of/

This tool shows a Graphviz rendering of high-level module dependencies.

The implementation was initially represented by this shell pipeline:

deno info --unstable --json -- "$moduleUrl" \
| deno run -- compute.ts "$options" \
| dot -T"svg"

Several output types are available. HTML and SVG renderings are the intended way of viewing the graph. In addition, the dot process can be removed to export raw JSON data from the computation phase. These are available as hyperlinks from the HTML output.

Note: Over time, the above pipeline is being consolidated into a Deno-native module.

  • deno info will be replaced with /x/deno_graph when Deno WASM is more mature and graph loading performance is comparable.
  • deno run has been removed already (the JSON is processed in the main process now).
  • dot -Tsvg might eventually be replaced with a WebAssembly build of GraphViz :) Font measuring will be a tricky point with that.

Deploy

These are just notes for me :)

IMAGE="gcr.io/stardust-156404/deno-module-visualizer:$TAG"
docker build . -t $IMAGE
docker push $IMAGE
gcloud alpha run services update deno-module-visualizer --platform=managed --project=stardust-156404 --region=us-central1 --image=$IMAGE

# or

# update tag in cloud-run.yaml
gcloud alpha run services replace cloud-run.yaml --platform=managed --project=stardust-156404 --region=us-central1

About

Interactive tools to explore ESM dependencies for any module which uses 'import' statements with URLs.

https://deno-visualizer.danopia.net/

License:MIT License


Languages

Language:TypeScript 67.8%Language:HTML 22.1%Language:CSS 5.1%Language:JavaScript 4.4%Language:Dockerfile 0.6%