-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
49 lines (44 loc) · 1.82 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
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(
"com.vmunier" %% "scalajs-scripts" % "1.0.0",
"com.typesafe.play" %% "play-slick" % "2.0.2",
"com.typesafe.play" %% "play-slick-evolutions" % "2.0.2",
"org.xerial" % "sqlite-jdbc" % "3.16.1",
"org.slf4j" % "slf4j-nop" % "1.6.4",
"com.adrianhurt" %% "play-bootstrap" % "1.1-P25-B3",
specs2 % Test
),
// Compile the project before generating Eclipse files, so that generated .scala or .class files for views and routes are present
EclipseKeys.preTasks := Seq(compile in Compile)
).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",
"com.github.benhutchison" %%% "prickle" % "1.1.13"
)
).enablePlugins(ScalaJSPlugin, ScalaJSWeb).
dependsOn(sharedJs)
lazy val shared = (crossProject.crossType(CrossType.Pure) in file("shared")).
settings(scalaVersion := scalaV,
libraryDependencies ++= Seq(
"com.github.benhutchison" %%% "prickle" % "1.1.13",
"com.lihaoyi" %%% "scalatags" % "0.6.2"
)
).
jsConfigure(_ enablePlugins ScalaJSWeb)
lazy val sharedJvm = shared.jvm
lazy val sharedJs = shared.js
scalacOptions += "-feature"
// loads the server project at sbt startup
onLoad in Global := (Command.process("project server", _: State)) compose (onLoad in Global).value