Sbt plugin
Hocones sbt plugin will run and create documentation for your project in compilation time. It will use project class loader - thanks of that all project configurations will be loaded.
Installation
Add in project/plugins.sbt
:
addSbtPlugin("pl.muninn" % "sbt-hocones" % "0.2")
And in build.sbt
to enable it:
lazy val root = (project in file("."))
.enablePlugins(HoconesPlugin)
And this is it. Plugin will run during compilation.
If you want to run it without compilation just run command:
sbt hocones
Sbt plugin configurations
hocones
- name of command to runloadConfigPath
- you can set path in config that should be used during generation of documentation - other paths will be ignoredignoredPaths
- list of paths to ignore (like akka, monix etc.) - few popular paths are ignored by defaultconfigFile
- which configuration file should be loaded - default is application.confpathForSave
- where documentation should be saved - default is{module}/src/main/resources/hocones
createEnvironmentFile
- should env file be created - default trueenvironmentFileWithComments
- should environment file contain comments - default trueenvironmentFileWithDefaults
- should environment file contain defaults - default trueenvironmentWithoutDuplicates
- should environment file be created without duplicates - default truecreateDocumentationFile
- should file with full documentation be created - default truecreateEnvironmentDocumentationTableFile
- should file with environment documentation be created - default trueenvironmentDocumentationFileTableAlignment
- what alignment should be used in environment document - default left - possible values (left, right, center)
Example of configuration:
lazy val root = (project in file("."))
.enablePlugins(HoconesPlugin)
.settings(
loadConfigPath := Some("pl.muninn"),
ignoredPaths ++= Seq("play.http", "play.auth"),
pathForSave := file(".") / "documentation",
createEnvironmentFile := false
)