-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate html and theme output per configuration (#312)
Separate html and theme output per configuration
- Loading branch information
Showing
8 changed files
with
44 additions
and
15 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
23 changes: 23 additions & 0 deletions
23
plugin/src/sbt-test/paradox/custom-configuration/build.sbt
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,23 @@ | ||
val Docs1 = config("docs1") | ||
val Docs2 = config("docs2") | ||
|
||
enablePlugins(ParadoxPlugin) | ||
|
||
ParadoxPlugin.paradoxSettings(Docs1) | ||
ParadoxPlugin.paradoxSettings(Docs2) | ||
|
||
TaskKey[Unit]("makeDocs") := { | ||
(Docs1 / paradox).value | ||
(Docs2 / paradox).value | ||
} | ||
|
||
TaskKey[Unit]("check") := { | ||
def checkFileContent(file: File, expected: String) = { | ||
assert(file.exists, s"${file.getAbsolutePath} does not exists") | ||
val contents = IO.readLines(file) | ||
assert(contents.exists(_.contains(expected)), s"Did not find '$expected' in\n${contents.mkString("\n")}") | ||
} | ||
|
||
checkFileContent((Docs1 / paradox / target).value / "index.html", "Docs1 index") | ||
checkFileContent((Docs2 / paradox / target).value / "index.html", "Docs2 index") | ||
} |
1 change: 1 addition & 0 deletions
1
plugin/src/sbt-test/paradox/custom-configuration/project/build.properties
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 @@ | ||
sbt.version=1.2.8 |
1 change: 1 addition & 0 deletions
1
plugin/src/sbt-test/paradox/custom-configuration/project/plugins.sbt
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 @@ | ||
addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % sys.props("project.version")) |
1 change: 1 addition & 0 deletions
1
plugin/src/sbt-test/paradox/custom-configuration/src/docs1/paradox/index.md
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 @@ | ||
Docs1 index. |
1 change: 1 addition & 0 deletions
1
plugin/src/sbt-test/paradox/custom-configuration/src/docs2/paradox/index.md
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 @@ | ||
Docs2 index. |
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,2 @@ | ||
> makeDocs | ||
> check |