Is there a program/tool that can generate function dependency graph for javascripts? Basically, the input should be a folder of javascript files, then the output is a nice graph that show all the relations between each function. It'll be better if I can interact with the graph, also.
Is there a way to do that?
Thanks
On windows and Visual Studio you can look at JSAnalyse: http://jsanalyse.codeplex.com/
I haven't tried it, but from the description, it parse the JavaScript files and creates a dependency tree of the different files based on the static references between them.
JSAnalyse is a tool to analyze the dependencies between JavaScript files and keep them under control. It helps to visualize and handle static references between JavaScript files in order to ensure the defined client-side architecture.
In the last couple years the amount of JavaScript lines in web applications has been dramatically increased. A lot of new client-side frameworks (like JQuery, Knockout, etc...) have aroused, but the tools for developing JavaScript just got slightly better. For instance, the Visual Studio 2010 has improved the IntelliSense. But for a well-designed application, not only the server-side code is relevant anymore. It is also very important to have a good architecture for the client-side code and to keep it in a healthy and good state during the whole application lifecycle. That is exactly when JSAnalyse comes into play. It enables not just the possibility to analyze the existing JavaScript dependencies but also to constrain them. The allowed dependencies can be either configured via XML or by using the great Visual Studio 2010 Architecture features. JSAnalyse provides an extension for the Visual Studio Layer Diagram to validate and control also dependencies between JavaScript files. This can be integrated into the build and with the Gated Check-in feature it is not even possible to check-in source code which does not fulfill the JavaScript architectural rules.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With