You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

9h 38m 11s logged

Okay! This is supposed to be a local tool that takes in a repository, creates a huge graph out of the entire thing (with relationships between imports, exports, function calls, etc), and then based on the graph, I’ll be able to answer questions like “what is this function for?”, or “What functions depend on this?”

The first step is scanning the repo (the easy part). Doing this was quite easy, since I just needed to use node’s fs module.

The next step is significantly more challenging: creating the graph. First, I’ll have to parse each file and get an AST out of it, then i’ll have to traverse it in order to collect all the information i need, along with all of the relationships.

Currently, this is the only output i can screenshot since im just trying to correctly parse and collect the AST nodes x-x but yes, i think its going to turn out well in the future :>

0
3

Comments 0

No comments yet. Be the first!