feat(root): attempt to create combined project
right now struggling with making page relative links, so that images would get pulled from "subproj/public" path
This commit is contained in:
parent
f6d8a1de8d
commit
572b63c82d
|
@ -4,7 +4,7 @@ fork := true
|
|||
ThisBuild / version := "0.0.1"
|
||||
ThisBuild / organization := "industries.sunshine"
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
lazy val singlePriceGridComponent = (project in file("."))
|
||||
.settings(
|
||||
name := "priceGrid",
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ val toolkitV = "0.1.7"
|
|||
val toolkit = "org.scala-lang" %% "toolkit" % toolkitV
|
||||
val toolkitTest = "org.scala-lang" %% "toolkit-test" % toolkitV
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
lazy val orderSummaryComponent = (project in file("."))
|
||||
.settings(
|
||||
name := "order-summary-component",
|
||||
libraryDependencies += toolkit,
|
||||
|
|
|
@ -4,7 +4,7 @@ fork := true
|
|||
ThisBuild / version := "0.0.1"
|
||||
ThisBuild / organization := "industries.sunshine"
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
lazy val testimonialsGrid = (project in file("."))
|
||||
.settings(
|
||||
name := "testimonials-grid-section",
|
||||
libraryDependencies ++= Seq(
|
||||
|
|
|
@ -4,7 +4,7 @@ fork := true
|
|||
ThisBuild / version := "0.0.1"
|
||||
ThisBuild / organization := "industries.sunshine"
|
||||
|
||||
lazy val root = (project in file("."))
|
||||
lazy val rockPaperScissors = (project in file("."))
|
||||
.settings(
|
||||
name := "rock-paper-scissors",
|
||||
libraryDependencies ++= Seq(
|
||||
|
|
|
@ -38,7 +38,7 @@ object Main {
|
|||
ParserForMethods(this).runOrExit(args)
|
||||
}
|
||||
|
||||
case class AppRoutes()(implicit cc: castor.Context, log: cask.Logger)
|
||||
case class AppRoutes(pathPrefix: String = "")(implicit cc: castor.Context, log: cask.Logger)
|
||||
extends cask.Routes {
|
||||
val templateResolver = new ClassLoaderTemplateResolver()
|
||||
templateResolver.setPrefix("templates/");
|
||||
|
@ -48,7 +48,7 @@ object Main {
|
|||
val templateEngine = new TemplateEngine()
|
||||
templateEngine.setTemplateResolver(templateResolver)
|
||||
|
||||
@cask.get("/")
|
||||
@cask.get(s"$pathPrefix/")
|
||||
def index(req: cask.Request) = {
|
||||
val context = new Context()
|
||||
val choices = Models.choiceSelectionItems.asJava
|
||||
|
@ -63,7 +63,7 @@ object Main {
|
|||
)
|
||||
}
|
||||
|
||||
@cask.get("/select/:choice")
|
||||
@cask.get(s"$pathPrefix/select/:choice")
|
||||
def acceptPlayerVote(choice: String) = {
|
||||
val context = new Context()
|
||||
val badge = Models.choiceSelectionItems.find(_.c.name == choice)
|
||||
|
@ -88,7 +88,7 @@ object Main {
|
|||
response
|
||||
}
|
||||
|
||||
@cask.get("/house-choice/:playersChoice")
|
||||
@cask.get(s"$pathPrefix/house-choice/:playersChoice")
|
||||
def requestHouseChoice(playersChoice: String) = {
|
||||
val context = new Context()
|
||||
val badge = Models.choiceSelectionItems.find(_.c.name == playersChoice)
|
||||
|
@ -121,7 +121,7 @@ object Main {
|
|||
response
|
||||
}
|
||||
|
||||
@cask.staticResources("/public")
|
||||
@cask.staticResources(s"$pathPrefix/public")
|
||||
def publicFiles(req: cask.Request) = {
|
||||
"public"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
ThisBuild / scalaVersion := "3.2.2"
|
||||
fork := true
|
||||
|
||||
ThisBuild / version := "0.0.1"
|
||||
ThisBuild / organization := "industries.sunshine"
|
||||
|
||||
lazy val rockPaperScissors = (project in file("14-rock-paper-scissors"))
|
||||
lazy val testimonialsGrid = (project in file("13-testimonials-grid-section"))
|
||||
lazy val orderSummaryComponent = (project in file("12-order-summary-component-thymeleaf"))
|
||||
lazy val singlePriceGridComponent = (project in file("11-single-price-grid-component"))
|
||||
|
||||
lazy val aggregatedExercises = (project in file("."))
|
||||
.settings(
|
||||
name := "aggregated-htmx-exercises",
|
||||
).dependsOn(
|
||||
rockPaperScissors,
|
||||
testimonialsGrid,
|
||||
orderSummaryComponent,
|
||||
singlePriceGridComponent,
|
||||
)
|
|
@ -0,0 +1 @@
|
|||
sbt.version=1.9.0
|
|
@ -0,0 +1,3 @@
|
|||
addSbtPlugin("io.spray" % "sbt-revolver" % "0.10.0")
|
||||
|
||||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.1")
|
|
@ -0,0 +1,8 @@
|
|||
package aggregatedexercises
|
||||
|
||||
object Main {
|
||||
def main(args: Array[String]): Unit = {
|
||||
val a = 1
|
||||
println(args.toList.mkString(", "))
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue