-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
41 lines (37 loc) · 1.57 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
val upickleV = "0.5.1"
lazy val server = (project in file("server")).settings(commonSettings).settings(
scalaJSProjects := Seq(client),
pipelineStages in Assets := Seq(scalaJSPipeline),
pipelineStages := Seq(digest, gzip),
// triggers scalaJSPipeline when using compile or continuous compilation
compile in Compile := ((compile in Compile) dependsOn scalaJSPipeline).value,
libraryDependencies ++= Seq(
"com.vmunier" %% "scalajs-scripts" % "1.1.1",
guice,
specs2 % Test,
"com.lihaoyi" %% "upickle" % upickleV,
"org.webjars" % "bootstrap" % "4.0.0",
"org.webjars" %% "webjars-play" % "2.6.3",
"org.webjars" % "jquery" % "3.2.1",
"org.webjars.bower" % "popper.js" % "1.12.9",
"org.webjars" % "Semantic-UI" % "2.3.1"
),
).enablePlugins(PlayScala).
dependsOn(sharedJvm)
lazy val client = (project in file("client")).settings(commonSettings).settings(
scalaJSUseMainModuleInitializer := false,
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "0.9.3",
"com.lihaoyi" %%% "upickle" % upickleV
)
).enablePlugins(ScalaJSPlugin, ScalaJSWeb).
dependsOn(sharedJs)
lazy val shared = (crossProject.crossType(CrossType.Pure) in file("shared")).settings(commonSettings).settings(libraryDependencies += "com.lihaoyi" %%% "upickle" % upickleV)
lazy val sharedJvm = shared.jvm
lazy val sharedJs = shared.js
lazy val commonSettings = Seq(
scalaVersion := "2.12.4",
organization := "dk.alfabetacain"
)
// loads the server project at sbt startup
onLoad in Global := (onLoad in Global).value andThen {s: State => "project server" :: s}