Skip to content

philcali/sbt-cx-docco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SBT / Circumflex Docco plugin

This is an overly simple sbt plugin for circumflex docco style documentation generation.

Here's an example on this very plugin: gh-pages

Include the plugin in your project/plugins.sbt

addSbtPlugin("com.github.philcali" % "sbt-cx-docco" % "0.1.3")

Your project definition may vary. The plugin allows pretty granular control over what files to document, and where to place the documentation. An example project definition below:

Build.sbt

import com.github.philcali.DoccoPlugin.docco

seq(doccoSettings: _*)

docco.title := "My Cool Project Docco"

docco.basePath := file("src/main/scala")

// I'm using this to filter files that contain this regex
// This defaults to anything that ends with .scala of course
docco.filenameRegex := """.*\.[scala|sbt]""".r

Build.scala

import sbt._

import com.github.philcali.DoccoPlugin.{
  docco,
  doccoSettings
}

object MyBuild extends Build {
  lazy val project = Project(
    "cool-stuff",
    file("."),
    settings = Defaults.defaultSettings ++ doccoSettings ++ Seq(
      docco.title := "My Cool Project Docco",
      docco.basePath <<= sourceDirectory,
      docco.filenameRegex := """.*\.[scala|sbt]""".r
    )
  )
}

Global Plugin

You can even include the plugin globally in ~/.sbt/plugins/build.sbt, and copy the dependency text from above.

Settings and Tasks

Here's a list of all the circumflex settings during the batch docco process (I copied from the plugin's source):

// Configurable Settings
docco.basePath := file("."),
docco.outputPath <<= (target) { _ / "docco" },
docco.pageTemplate := file(".") / "docco-batch-page.html.ftl",
docco.indexTemplate := file(".") / "docco-index.html.ftl",
docco.filenameRegex := """.*\.scala$""".r,
docco.title <<= name,
docco.stripScaladoc := true,
docco.skipEmpty := true

// Configurable Tasks
docco.properties
docco.generate

Run the docco-generate task to generate docco documentation.

About

Allows docco style documentation generation for sbt

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages