Skip to content
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

Local Visualization #36

Closed
RilDev opened this issue Sep 1, 2021 · 9 comments
Closed

Local Visualization #36

RilDev opened this issue Sep 1, 2021 · 9 comments

Comments

@RilDev
Copy link

RilDev commented Sep 1, 2021

Good day,

I found out about this project today and I'm very impressed! It would be a great tool for people on my team (myself included) to get to know quickly code bases we are not familiar with.

But we don't use GitHub in my company.

Is there a way to run this repo-visualizer locally? A bit like what was done here: https://octo-repo-visualization.vercel.app

Thank you!

@Wattenberger
Copy link
Contributor

Hey @RilDev, thanks for the kind words! The GitHub Action is basically just running this node script:

https://github.com/githubocto/repo-visualizer/blob/main/src/index.jsx

which gets bundled with this npm command:

https://github.com/githubocto/repo-visualizer/blob/main/package.json#L3

You should be able to get it working outside of GitHub Actions with minor tweaks!

@RilDev
Copy link
Author

RilDev commented Sep 3, 2021

Thank you very much, I'll be trying this out soon !

@noklam
Copy link

noklam commented Nov 3, 2021

Thank you very much, I'll be trying this out soon !

@RilDev Any luck or hints how can we do this?

@RilDev
Copy link
Author

RilDev commented Nov 3, 2021

Hi @noklam I didn't get around to do it yet. You know, stuff happened!

It was starting to weigh on my conscience actually. Like I said I would do it and then didn't. Thanks for this opportunity of actually keeping my word!

I'll be experimenting with it today!

@noklam
Copy link

noklam commented Nov 3, 2021

@RilDev Thanks :) I am not familiar with node so I am trying to making tweak to it.

https://github.com/githubocto/repo-visualizer/blob/main/src/index.js seems creating the SVG diagram, ideally would love to keep the interactive feature just like https://octo-repo-visualization.vercel.app

@RilDev
Copy link
Author

RilDev commented Nov 3, 2021

Alright, let's get things going!

Here is the fork I'll be pushing my modifications on: https://github.com/RilDev/repo-visualizer

So far I just commented out the Github actions related code and generate the SVG using yarn build.

@Wattenberger could you tell me more about the interactive app https://octo-repo-visualization.vercel.app? Is it generated by another project?

@noklam
Copy link

noklam commented Nov 3, 2021 via email

@robatwilliams
Copy link

To generate static diagram locally using RilDev's (thanks!) fork above.

  1. checkout @RilDev's fork, yarn
  2. Uncomment src/index.js from line 102 downwards - you've commented out a bit too much
  3. yarn build
  4. Change working directory to the directory you want analysed
  5. node ../../repo-visualizer/index.js

Other things you can hack:

  • increase the hard-coded dimensions from 1000 in Tree.tsx, for a big codebase
  • add excluded paths in index.jsx:30
  • adjust the function that decides whether to enable each circle in Tree.tsx

@RilDev
Copy link
Author

RilDev commented Jan 15, 2022

Hi there @robatwilliams! Thanks for the tips, I was able to get it to work!

I also updated my fork: https://github.com/RilDev/repo-visualizer

Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants