DEV Community

Cover image for πŸ’₯ Introducing Skott, the new Madge!

πŸ’₯ Introducing Skott, the new Madge!

Antoine Coulon on September 12, 2022

Little announcement: thanks for anyone showing interest in skott! Just for your own information, this article was not recently updated to include ...
Collapse
 
ild0tt0re profile image
Angelo Annunziata • Edited

WOW!! Finally a tool that will help us reduce technical debt and give us some metrics to take strategic decision on the codebase.
Thanks @antoinecoulon!

I will follow your interesting series about the journey of building skott.

Collapse
 
antoinecoulon profile image
Antoine Coulon

Thanks a lot for you feedback @ild0tt0re I appreciate it!

Tomorrow will be the first episode of the series dedicated to the journey, happy to know that you'll be following that =)

Looking forward to chat with you!

Collapse
 
frolovdev profile image
Andrey Frolov

Great one! What's the difference with dependency cruiser?

Collapse
 
antoinecoulon profile image
Antoine Coulon • Edited

Thanks @frolovdev :) dependency-cruiser is a great tool, it's true that according to this introduction they look alike as they both enable graph visualization from JavaScript/TypeScript projects.

Nevertheless the main objective of Skott is not really to act only as a dependencies visualizer but instead its goal is to expose API primitives on top of the generated graph. This would allow the graph to be used to perform graph inspection (cyclic dependencies, unused nodes, dead code), graph diffing, but also creating incremental tasks orchestrator tools, etc.

Collapse
 
frolovdev profile image
Andrey Frolov

Thank you for the clarification, looks sick!

Collapse
 
darshan1212 profile image
Darshan Patel

Hey Antoine Coulon, This is so amazing! We are so grateful to you! It works like charm!

Collapse
 
antoinecoulon profile image
Antoine Coulon

Hey @darshan1212, thank you very much for your feedback, appreciate it a lot!
Feel free to open issues for either bugs or features if you have ideas in mind :)

Collapse
 
pdoy38 profile image
Patrick Doy

Looks like a promising tool!

Collapse
 
antoinecoulon profile image
Antoine Coulon

Thanks for the feedback @pdoy38!

Collapse
 
wadecodez profile image
Wade Zimmerman

Certainly a cool tool but what is the actual benefit of using something like this other than visualization? How can I use this to improve my project?

Collapse
 
antoinecoulon profile image
Antoine Coulon • Edited

Thanks for the feedback @wadecodez :)
Visualization is just a support to draw the dependency graph of the project (you can start the project in headless mode), but the analysis aims to be wider than just for visualization purposes such as detecting cyclic imports, tracking unused imports/exports (not yet implemented), enforcing imports boundaries (not yet implemented) etc. The goal in the long run is not even the visualization as the primary purpose, but allowing a quick feedback about dead code, misconceptions, architecture smells for any project and for any programming language (only a JavaScript parser is implemented but Python, Go etc could be introspected the same way).

By the way, this is just the 0.2.* version so no a major release yet, I would be happy to hear any suggestion or feature that would be valuable for you.

EDIT:
Also another topic which is not covered up in this article is simply the fact of traversing and using the directed graphs generated by skott (find leaves, find deeply all parents/children of a given nodes, etc). For instance it could fundamentally be used by tools aiming to process incremental/affected tasks.

Collapse
 
wadecodez profile image
Wade Zimmerman

It would be cool if the tool could automatically remove cyclic dependencies and/or optimize imports.

Collapse
 
darylshy profile image
Daryl Shy • Edited

Hi, thanks for creating this awesome tool. I am, however, not super clear on how to implement this at work. We have a typescript/react mono-repo setup which uses Rush. I am trying to follow the documentation on the Github repo but it's not super clear to me how this works. What are we supposed to do with the Javascript API you've shown here and on your repo? Is this just for example? To show what is exposed? Or, are we supposed to embed this in the app somehow? The only thing I've been able to grok at this point is installing skott and running it from the node_modules .bin directory which spits out a gigantic graph. So I know it is working. Is that the idea? Idk, I'm totally confused.

Collapse
 
matiascarpintini profile image
Matias Carpintini

What’s that font? 😍

Collapse
 
antoinecoulon profile image
Antoine Coulon

@matiascarpintini Cascadia Code PL :)