Quick Start

If you use Maven for building your project, add following lines to pom.xml (or merge XML sections accordingly):

<properties>
  <cx.version><!-- desired version --></cx.version>
</properties>
<dependencies>
  <dependency>
    <groupId>ru.circumflex</groupId>
    <artifactId>circumflex-docco</artifactId>
    <version>${cx.version}</version>
  </dependency>
</dependencies>

If you prefer SBT, make sure that libraryDependencies of your project contains following artifact:

"ru.circumflex" % "circumflex-docco" % cxVersion % "compile->default"

where cxVersion points to desired Circumflex version. Here's the sample project configuration:

import sbt._

class MyProject(info: ProjectInfo) extends DefaultProject(info) {
  val cxVersion = "2.0"

  override def libraryDependencies = Set(
      "ru.circumflex" % "circumflex-docco" % cxVersion % "compile->default"
  ) ++ super.libraryDependencies

}

You can follow SBT Setup Guide to create a new project.

Note that first-time builds usually require a substantial amount of dependencies downloads.

The usage is trivial:

import ru.circumflex.docco._

Docco("my.scala").toHtml("my.scala.html")
// or equivalent:
Docco("my.scala").toHtml

Docco uses FreeMarker to process pages, so you can provide your own FreeMarker Configuration and templates. Two templates are used in Docco generation, both of them can be found in circumflex-docco.jar and can be overriden by setting corresponding configuration parameters:

Generating Documentation With Maven

You can use Circumflex Maven Plugin for generating source code documentation of your Maven project. Refer to the plugin documentation for further information.

SBT Docco Generator

You can use SBT plugin for generating source code documentation that allows the developer to configure the batch generator via vanilla sbt configuration.

Thanks to philcali