Skip to content

Commit 764e6c4

Browse files
committed
Release 1.0.0
1 parent 090f6de commit 764e6c4

File tree

4 files changed

+38
-28
lines changed

4 files changed

+38
-28
lines changed

build.sbt

+19-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,26 @@
11
name in ThisBuild := "youi-template"
22
organization in ThisBuild := "io.youi"
3-
version in ThisBuild := "1.0.0-SNAPSHOT"
3+
version in ThisBuild := "1.0.0"
44
scalaVersion in ThisBuild := "2.12.6"
5+
resolvers in ThisBuild += Resolver.sonatypeRepo("releases")
56

6-
val youi = "0.9.0-M22-SNAPSHOT"
7+
publishTo in ThisBuild := sonatypePublishTo.value
8+
sonatypeProfileName in ThisBuild := "io.youi"
9+
publishMavenStyle in ThisBuild := true
10+
licenses in ThisBuild := Seq("MIT" -> url("https://github.com/outr/youi-template/blob/master/LICENSE"))
11+
sonatypeProjectHosting in ThisBuild := Some(xerial.sbt.Sonatype.GitHubHosting("outr", "youi-template", "matt@outr.com"))
12+
homepage in ThisBuild := Some(url("https://github.com/outr/youi-template"))
13+
scmInfo in ThisBuild := Some(
14+
ScmInfo(
15+
url("https://github.com/outr/youi-template"),
16+
"scm:git@github.com:outr/youi-template.git"
17+
)
18+
)
19+
developers in ThisBuild := List(
20+
Developer(id="darkfrog", name="Matt Hicks", email="matt@matthicks.com", url=url("http://matthicks.com"))
21+
)
22+
23+
val youi = "0.9.0-M22"
724
val powerScala = "2.0.5"
825

926
lazy val template = crossApplication.in(file("."))

jvm/src/main/scala/io/youi/template/ServerTemplateApplication.scala

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
11
package io.youi.template
22

3+
import java.io.File
4+
35
import io.youi.app.ServerApplication
6+
import io.youi.http.Content
47
import io.youi.stream._
58
import profig.Profig
69

710
class ServerTemplateApplication(compiler: TemplateCompiler) extends ServerApplication with TemplateApplication {
8-
addTemplate(compiler.destinationDirectory, deltas = List(
9-
Delta.InsertFirstChild(ByTag("body"), s"""<input type="hidden" id="template_pages" value="${compiler.pages.mkString(";")}"/>""")
10-
))
11+
addTemplate(
12+
lookup = (fileName: String) => {
13+
val file = new File(compiler.destinationDirectory, fileName)
14+
if (file.exists()) {
15+
Some(Content.file(file))
16+
} else {
17+
None
18+
}
19+
},
20+
deltas = List(
21+
Delta.InsertFirstChild(ByTag("body"), s"""<input type="hidden" id="template_pages" value="${compiler.pages.mkString(";")}"/>""")
22+
)
23+
)
1124

1225
override def main(args: Array[String]): Unit = {
1326
Profig.loadDefaults()

publish.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/usr/bin/env bash
2+
3+
sbt +clean +compile +templateJS/publishSigned +templateJVM/publishSigned sonatypeRelease

sonatype.sbt

-23
This file was deleted.

0 commit comments

Comments
 (0)