Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generates the ScalaDoc and adds the api to the microsite #50

Merged
merged 1 commit into from
May 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,14 @@ lazy val combinators = (project in file("combinators"))
.settings(testSettings)
.settings(commonDeps)

lazy val docs = (project in file("docs"))
lazy val docs: Project = (project in file("docs"))
.settings(moduleName := "scalacheck-toolbox-docs")
.settings(name := "scalacheck-toolbox")
.settings(micrositeSettings: _*)
.enablePlugins(MicrositesPlugin)
.enablePlugins(ScalaUnidocPlugin)
.settings(
unidocProjectFilter in(ScalaUnidoc, unidoc) := inProjects(datetime, magic, combinators, docs))
.dependsOn(datetime)
.dependsOn(magic)
.dependsOn(combinators)
5 changes: 4 additions & 1 deletion docs/src/main/resources/microsite/data/menu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ options:
url: docs/magic/index.html

- title: Combinators
url: docs/combinators/index.html
url: docs/combinators/index.html

- title: ScalaDoc
url: api/com/fortysevendeg/scalacheck
14 changes: 11 additions & 3 deletions project/ProjectPlugin.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import com.typesafe.sbt.site.jekyll.JekyllPlugin.autoImport._
import com.typesafe.sbt.site.SitePlugin.autoImport._
import microsites.MicrositesPlugin.autoImport._
import sbt.Keys._
import sbt._
Expand All @@ -7,10 +8,11 @@ import scoverage.ScoverageKeys._
import sbtorgpolicies.OrgPoliciesKeys.orgBadgeListSetting
import sbtorgpolicies.OrgPoliciesPlugin
import sbtorgpolicies.OrgPoliciesPlugin.autoImport._
import sbtorgpolicies.model.{Dev, scalac}
import sbtorgpolicies.model.scalac
import sbtorgpolicies.templates.badges._
import sbtorgpolicies.runnable.syntax._
import sbtorgpolicies.runnable._
import sbtunidoc.ScalaUnidocPlugin.autoImport._
import tut.Plugin._

object ProjectPlugin extends AutoPlugin {
Expand All @@ -21,14 +23,19 @@ object ProjectPlugin extends AutoPlugin {

object autoImport {

lazy val docsMappingsAPIDir: SettingKey[String] = settingKey[String](
"Name of subdirectory in site target directory for api docs")

lazy val micrositeSettings = Seq(
micrositeName := "scalacheck-toolbox",
micrositeDescription := "A helping hand for generating sensible data with ScalaCheck",
micrositeDocumentationUrl := "/scalacheck-toolbox/docs/",
micrositeBaseUrl := "/scalacheck-toolbox",
micrositeGithubRepo := "scalacheck-toolbox",
micrositeGithubOwner := "47deg",
includeFilter in Jekyll := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.md"
includeFilter in Jekyll := "*.html" | "*.css" | "*.png" | "*.jpg" | "*.gif" | "*.js" | "*.swf" | "*.md",
docsMappingsAPIDir in ScalaUnidoc := "api",
addMappingsToSiteDir(mappings in(ScalaUnidoc, packageDoc), docsMappingsAPIDir in ScalaUnidoc)
)

lazy val testSettings = Seq(
Expand Down Expand Up @@ -62,7 +69,8 @@ object ProjectPlugin extends AutoPlugin {
(compile in Compile).asRunnableItemFull,
"test-only * -- -minSuccessfulTests 100000".asRunnableItemFull,
(ScoverageKeys.coverageReport in Test).asRunnableItemFull,
(tut in ProjectRef(file("."), "docs")).asRunnableItem
(tut in ProjectRef(file("."), "docs")).asRunnableItem,
"docs/unidoc".asRunnableItemFull
)
)
}