JSDoc UML Diagram

前端 未结 2 1478
礼貌的吻别
礼貌的吻别 2020-12-30 09:22

Question: I\'m editing and using an open source javascript library that has JSDoc tags in its code. I was wondering if anyone knew of a JSDoc plugin that would allow me to

相关标签:
2条回答
  • 2020-12-30 09:57

    Not sure what past versions of JSDoc were capable of but JSDoc now supports Javascript classes and the extends keyword. If code is marked up correctly JSDoc can understand class inheritance.

    Could make a JSDoc plugin which subscribes to the processingComplete event: "The processingComplete event is fired after JSDoc updates the parse results to reflect inherited and borrowed symbols." http://usejsdoc.org/about-plugins.html

    Then you can iterate over the Doclets (objects representing code elements) and serialize your own JSON out. Then you can write a simple HTML renderer for the JSON description of your original code.

    0 讨论(0)
  • 2020-12-30 10:14

    you can use doxygen tools , it provides metadata to generate uml class diagram

    http://plantuml.sourceforge.net/doxygen.html

    0 讨论(0)
提交回复
热议问题