summaryrefslogtreecommitdiff
path: root/build.sbt
diff options
context:
space:
mode:
authorAdam Izraelevitz2020-08-21 12:02:26 -0700
committerGitHub2020-08-21 19:02:26 +0000
commit7edba2d10f980016462f917c6d21d64585ddfd6b (patch)
tree3eb2a106b0e528b1ae8ed05b54200f828902de09 /build.sbt
parent70fd01d4b0ad18a87bc46558ff246254792aa9b8 (diff)
Added website docs and mdoc. (#1560)
* Added website docs and mdoc. Removed all warnings * Updated README and added build to circle ci * Added how to build documentation, deprecated wiki * Fix copypasta Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Diffstat (limited to 'build.sbt')
-rw-r--r--build.sbt15
1 files changed, 15 insertions, 0 deletions
diff --git a/build.sbt b/build.sbt
index 60ded729..0b0afb4a 100644
--- a/build.sbt
+++ b/build.sbt
@@ -239,6 +239,21 @@ lazy val chisel = (project in file(".")).
)
)
+lazy val docs = project // new documentation project
+ .in(file("docs-target")) // important: it must not be docs/
+ .dependsOn(chisel)
+ .enablePlugins(MdocPlugin)
+ .settings(commonSettings)
+ .settings(
+ scalacOptions += "-language:reflectiveCalls",
+ mdocIn := file("docs/src"),
+ mdocOut := file("docs/generated"),
+ mdocExtraArguments := Seq("--cwd", "docs"),
+ mdocVariables := Map(
+ "BUILD_DIR" -> "docs-target" // build dir for mdoc programs to dump temp files
+ )
+ )
+
addCommandAlias("com", "all compile")
addCommandAlias("lint", "; compile:scalafix --check ; test:scalafix --check")
addCommandAlias("fix", "all compile:scalafix test:scalafix")