JSDoc UML Diagram

前端 未结 2 1494
礼貌的吻别
礼貌的吻别 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.

提交回复
热议问题