fixing common as crossCompiled
This commit is contained in:
parent
2c66a9a8c2
commit
313cf3a405
29
build.sbt
29
build.sbt
|
@ -23,7 +23,7 @@ lazy val frontend = project
|
|||
scalaJSLinkerConfig ~= {
|
||||
_.withModuleKind(ModuleKind.ESModule)
|
||||
.withModuleSplitStyle(
|
||||
ModuleSplitStyle.SmallModulesFor(List("livechart"))
|
||||
ModuleSplitStyle.SmallModulesFor(List("industries.sunshine.planningpoker"))
|
||||
)
|
||||
},
|
||||
|
||||
|
@ -34,7 +34,7 @@ lazy val frontend = project
|
|||
libraryDependencies += "com.raquo" %%% "laminar" % "15.0.1",
|
||||
libraryDependencies += "io.laminext" %%% "websocket" % "0.15.0"
|
||||
)
|
||||
.dependsOn(common)
|
||||
.dependsOn(common.js)
|
||||
|
||||
val circeVersion = "0.14.1"
|
||||
val http4sVersion = "1.0.0-M39"
|
||||
|
@ -52,18 +52,27 @@ lazy val backend = project
|
|||
// available for 2.12, 2.13, 3.2
|
||||
libraryDependencies += "co.fs2" %% "fs2-core" % "3.6.1",
|
||||
libraryDependencies += "org.typelevel" %% "cats-core" % "2.9.0",
|
||||
libraryDependencies += "org.typelevel" %% "cats-effect" % "3.4.9",
|
||||
libraryDependencies += "org.typelevel" %% "cats-effect" % "3.4.9"
|
||||
)
|
||||
.dependsOn(common)
|
||||
.dependsOn(common.jvm)
|
||||
|
||||
lazy val common = project
|
||||
lazy val common = crossProject(JSPlatform, JVMPlatform)
|
||||
.crossType(CrossType.Pure)
|
||||
.in(file("common"))
|
||||
.settings(
|
||||
commonSettings,
|
||||
libraryDependencies ++= Seq(
|
||||
"io.circe" %% "circe-core",
|
||||
"io.circe" %% "circe-generic",
|
||||
"io.circe" %% "circe-parser"
|
||||
).map(_ % circeVersion),
|
||||
|
||||
"io.circe" %%% "circe-core",
|
||||
"io.circe" %%% "circe-generic",
|
||||
"io.circe" %%% "circe-parser"
|
||||
).map(_ % circeVersion)
|
||||
)
|
||||
|
||||
lazy val commonJVM = common.jvm
|
||||
lazy val commonJS = common.js.settings(
|
||||
// scalaJS specific settings
|
||||
scalaJSLinkerConfig ~= {
|
||||
_.withModuleKind(ModuleKind.ESModule)
|
||||
.withModuleSplitStyle(ModuleSplitStyle.SmallModulesFor(List("industries.sunshine.planningpoker")))
|
||||
}
|
||||
)
|
||||
|
|
|
@ -2,7 +2,10 @@ package industries.sunshine.planningpoker.common
|
|||
|
||||
import java.util.UUID
|
||||
import io.circe._
|
||||
import scala.scalajs.js
|
||||
import scala.scalajs.js.annotation.JSExportTopLevel
|
||||
|
||||
@JSExportTopLevel("Models", "library")
|
||||
object Models {
|
||||
|
||||
/** view of the single planning poker round
|
||||
|
|
|
@ -3,6 +3,10 @@ package industries.sunshine.planningpoker
|
|||
import io.circe.generic.semiauto._
|
||||
import io.circe._
|
||||
|
||||
import scala.scalajs.js
|
||||
import scala.scalajs.js.annotation.JSExportTopLevel
|
||||
|
||||
@JSExportTopLevel("Requests", "library")
|
||||
object Requests {
|
||||
final case class LogIn(roomName: String, nickname: String, password: String) derives Codec.AsObject
|
||||
}
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.1")
|
||||
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")
|
||||
|
|
Loading…
Reference in New Issue