-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
45 lines (36 loc) · 1.39 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
import sbt.Project.projectToRef
lazy val clients = Seq(scalajsclient)
lazy val scalaV = "2.11.8"
lazy val playserver = (project in file("play")).settings(
scalaVersion := scalaV,
scalaJSProjects := clients,
libraryDependencies ++= Seq(
"com.lihaoyi" %% "scalatags" % "0.5.5",
"org.webjars" % "jquery" % "3.0.0"
)
).enablePlugins(PlayScala).
aggregate(clients.map(projectToRef): _*).
dependsOn(sharedJvm)
lazy val scalajsclient = (project in file("scalajs")).settings(
scalaVersion := scalaV,
persistLauncher := true,
persistLauncher in Test := false,
// sourceMapsDirectories += sharedJs.base / "..",
unmanagedSourceDirectories in Compile := Seq((scalaSource in Compile).value),
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "0.8.2",
"com.lihaoyi" %%% "scalatags" % "0.5.5"
)
).enablePlugins(ScalaJSPlugin, ScalaJSPlay).
dependsOn(sharedJs)
lazy val shared = (crossProject.crossType(CrossType.Pure) in file("shared")).
settings(scalaVersion := scalaV).
jsConfigure(_ enablePlugins ScalaJSPlay)
// jsSettings(sourceMapsBase := baseDirectory.value / "..")
lazy val sharedJvm = shared.jvm
lazy val sharedJs = shared.js
// loads the Play project at sbt startup
onLoad in Global := (Command.process("project playserver", _: State)) compose (onLoad in Global).value
// for Eclipse users
EclipseKeys.skipParents in ThisBuild := false
fork in run := true