artifacthealth / typedoc-plantuml

Plugin for TypeDoc that generates images for PlantUML diagrams embedded in comments.
Apache License 2.0
15 stars 6 forks source link

Added option for generating UML class diagrams #8

Closed krisztianb closed 4 years ago

krisztianb commented 4 years ago

Use the new option --umlAddClassDiagram to automatically add UML class diagrams to classes and interfaces.

Here is how it works:

  1. Specify the option --umlAddClassDiagram (value = above|below) when executing TypeDoc.
  2. If the option is specified a <uml> tag is added to the comment of the class/interface. The tag includes a basic class diagram showing the class/interface and its extended/implemented types.
  3. The plugin goes on as usual and creates an image from the tag.
krisztianb commented 4 years ago

Looking through all the documentation generation tools for TypeDoc I haven't found a single one that supports UML diagrams.

@meirgottlieb your plugin is great and enables one to define all kinds of UML diagrams everywhere in the comments. Terrific job!

What I found is that people usually only want some kind of basic class diagram in their documentation. Having to write all the PlantUML for this in ever single file is very tiresome. So I decided to create an option that does this automatically.

Please review the code and tell me what you think about it. Thanks a lot.

krisztianb commented 4 years ago

I had some new ideas for improving my code. I'll update the code and create a new pull request soon.