Zugen
A tool for generating Zu(図) of Scala project.
Documents to be generated
These screenshots are generated in the example Scala project.
Domain object table
A table of domain objects under the specified packages.
- List package, object/trait/class name, scaladoc and file path
- Show referrer count
Domain relation diagram
A diagram which indicates relation among domain objects.
- Show inheritance relations
- Show properties
- Highlight references which is bound to outside of domain package in red
- Handle container class (Seq[T], etc.)
Setup
project/plugins.sbt
addSbtPlugin("io.github.todokr" % "sbt-zugen" % "(version)")
build.sbt
// zugen loads source code infomation from SemainticDB
addCompilerPlugin("org.scalameta" %% "semanticdb-scalac" % "4.3.17" cross CrossVersion.full)
scalacOptions ++= Seq("-Yrangepos", "-P:semanticdb:text:on")
enablePlugins(ZugenPlugin)
zugenDomainPackages := Seq("your.projects.domain", "your.projects.other.domain")
Run
$ sbt zugen
Setting keys are defined in here.
Thanks
Zugen is inspired by JIG, which is a document generator for Java project and its philosophy.