-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change tut -> mdoc due to tut deprecation
- Loading branch information
1 parent
e2ba283
commit 6262eb6
Showing
8 changed files
with
49 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import com.typesafe.sbt.site.SitePlugin.autoImport._ | ||
import mdoc.MdocPlugin, MdocPlugin.autoImport._ | ||
import sbt._, Keys._ | ||
import sbt.plugins.{JvmPlugin, SbtPlugin} | ||
|
||
/** Provides glue to integrate mdoc with sbt-site. */ | ||
object MdocSitePlugin extends AutoPlugin { | ||
override def trigger = allRequirements | ||
|
||
override def requires = JvmPlugin && MdocPlugin | ||
|
||
object autoImport { | ||
val mdocSite = taskKey[Seq[(File, String)]]("create mdoc documentation in a way that lets sbt-site grab it") | ||
val mdocSiteOut = settingKey[String]("name of the directory in which sbt-site will store mdoc documentation") | ||
} | ||
|
||
import autoImport._ | ||
|
||
override def projectSettings: Seq[Setting[_]] = Seq( | ||
mdocSite := { | ||
mdoc.toTask(" ").value | ||
val out = mdocOut.value | ||
for { | ||
(file, name) <- out ** AllPassFilter --- out pair Path.relativeTo(out) | ||
} yield file -> name | ||
}, | ||
mdocSiteOut := "./", | ||
addMappingsToSiteDir(mdocSite, mdocSiteOut) | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters