-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
54 lines (44 loc) · 1.73 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
42
43
44
45
46
47
48
49
50
51
52
53
54
name := """MALAMINE"""
version := "1.0-SNAPSHOT"
lazy val scalaV = "2.11.8"
lazy val server = (project in file("server")).settings(
scalaVersion := scalaV,
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,
libraryDependencies ++= Seq(
cache,
ws,
"com.vmunier" %% "scalajs-scripts" % "1.0.0",
"org.webjars" %% "webjars-play" % "2.5.0",
"org.webjars" % "bootstrap" % "3.3.7-1",
"org.webjars" % "jquery" % "3.1.1-1",
"org.scalatestplus.play" %% "scalatestplus-play" % "1.5.1" % Test,
"com.typesafe.slick" %% "slick" % "3.0.0",
"com.typesafe.play" %% "play-slick-evolutions" % "1.1.0",
"org.slf4j" % "slf4j-nop" % "1.6.4",
"mysql" % "mysql-connector-java" % "5.1.38"
)
).enablePlugins(PlayScala).
dependsOn(sharedJvm)
lazy val client = (project in file("client")).settings(
scalaVersion := scalaV,
persistLauncher := true,
persistLauncher in Test := false,
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "0.9.1",
"be.doeraene" %%% "scalajs-jquery" % "0.9.1",
"com.lihaoyi" %%% "scalatags" % "0.4.6"
)
).enablePlugins(ScalaJSPlugin, ScalaJSWeb).
dependsOn(sharedJs)
lazy val shared = (crossProject.crossType(CrossType.Pure) in file("shared")).
settings(scalaVersion := scalaV).
jsConfigure(_ enablePlugins ScalaJSWeb)
lazy val sharedJvm = shared.jvm
lazy val sharedJs = shared.js
// loads the server project at sbt startup
onLoad in Global := (Command.process("project server", _: State)) compose (onLoad in Global).value
fork in run := true