-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
#67 gitbook mappings
- Loading branch information
Showing
10 changed files
with
98 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
project/ | ||
target/ | ||
boot/ | ||
global/ | ||
*.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 @@ | ||
_book |
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,12 @@ | ||
# Hello, GitBook! | ||
|
||
The SBT site plugin can build your http://gitbook.com[GitBook] documentation. | ||
|
||
## First Section | ||
|
||
- item 1 | ||
- item 2 | ||
|
||
```scala | ||
case class User(name: String, age: Int) | ||
``` |
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 @@ | ||
# Summary |
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,3 @@ | ||
{ | ||
"gitbook": "3.x.x" | ||
} |
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 @@ | ||
name := "test" | ||
|
||
enablePlugins(GitBookPlugin) | ||
|
||
sourceDirectory in GitBook := baseDirectory.value | ||
siteSubdirName in GitBook := "docs" | ||
|
||
val gitHeadPath = ".git/HEAD" | ||
|
||
initialize := { | ||
// Create .git test file before running makeSite | ||
IO.write(baseDirectory.value / gitHeadPath, "test") | ||
} | ||
|
||
TaskKey[Unit]("checkContent") := { | ||
val dest = (target in makeSite).value / (siteSubdirName in GitBook).value | ||
|
||
val generatedGitFile = baseDirectory.value / gitHeadPath | ||
assert(generatedGitFile.exists, s"${generatedGitFile.getAbsolutePath} did not exist") | ||
|
||
for (path <- Seq("index.html")) { | ||
val file = dest / path | ||
assert(file.exists, s"${file.getAbsolutePath} did not exist") | ||
} | ||
|
||
for (path <- Seq(gitHeadPath, ".gitignore", ".bookignore", "target", "project")) { | ||
val file = dest / path | ||
assert(!file.exists, s"${file.getAbsolutePath} should not exist") | ||
} | ||
} |
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.typesafe.sbt" % "sbt-site" % sys.props("project.version")) |
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 @@ | ||
> make-site | ||
> checkContent |