gpt4 book ai didi

javascript - 用于分析和绘制 Javascript 函数之间依赖关系的工具

转载 作者:数据小太阳 更新时间:2023-10-29 04:49:51 29 4
gpt4 key购买 nike

是否有可以为 javascript 生成函数依赖关系图的程序/工具?基本上,输入应该是 javascript 文件的文件夹,然后输出是一个漂亮的图表,显示每个函数之间的所有关系。如果我也可以与图表进行交互,那就更好了。

有办法吗?

谢谢

最佳答案

在 Windows 和 Visual Studio 上,您可以查看 JSAnalyse:http://jsanalyse.codeplex.com/

我没试过,但根据描述,它解析 JavaScript 文件并根据它们之间的静态引用创建不同文件的依赖关系树。

项目

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.

关于javascript - 用于分析和绘制 Javascript 函数之间依赖关系的工具,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15872851/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com