-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
63 lines (53 loc) · 2.79 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
55
56
57
58
59
60
61
62
63
import sbt.Project.projectToRef
organization := "io.plasmap"
lazy val clients = Seq(client)
lazy val scalaVersionNumber = "2.11.6"
lazy val server = (project in file("server")).settings(
scalaVersion := scalaVersionNumber,
scalaJSProjects := clients,
pipelineStages := Seq(scalaJSProd, gzip),
resolvers ++= Seq("scalaz-bintray" at "https://dl.bintray.com/scalaz/releases",
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
"Sonatype Releases" at "https://oss.sonatype.org/content/repositories/releases/",
"spray repo" at "http://repo.spray.io",
"spray nightlies repo" at "http://nightlies.spray.io"),
libraryDependencies ++= Seq(
"com.vmunier" %% "play-scalajs-scripts" % "0.3.0" ,
"org.scalaz" %% "scalaz-core" % "7.1.3" ,
"org.scalaz.stream" %% "scalaz-stream" % "0.7.2a" ,
"com.chuusai" %% "shapeless" % "2.2.5" ,
"org.webjars" % "jquery" % "1.11.1" ,
"com.lihaoyi" %% "upickle" % "0.3.6" ,
"com.nicta" %% "rng" % "1.3.0" ,
ws,
specs2 % Test
)
).enablePlugins(PlayScala)
.aggregate(clients.map(projectToRef):_*)
.dependsOn(sharedJvm)
lazy val client = (project in file("client")).settings(
scalaVersion := scalaVersionNumber,
persistLauncher := true,
persistLauncher in Test := false,
sourceMapsDirectories += sharedJs.base / "..",
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "0.8.2",
"com.github.japgolly.scalajs-react" %%% "core" % "0.10.1",
"com.github.japgolly.scalajs-react" %%% "ext-scalaz71" % "0.10.1",
"com.github.japgolly.scalajs-react" %%% "ext-monocle" % "0.10.1",
"com.github.chandu0101.scalajs-react-components" %%% "core" % "0.1.0",
"com.lihaoyi" %%% "upickle" % "0.3.6"
),
jsDependencies += "org.webjars.npm" % "react" % "0.14.1" / "react-with-addons.js" commonJSName "React" minified "react-with-addons.min.js",
jsDependencies += "org.webjars.npm" % "react-dom" % "0.14.1" / "react-dom.js" commonJSName "ReactDOM" minified "react-dom.min.js" dependsOn "react-with-addons.js"
).enablePlugins(ScalaJSPlugin, ScalaJSPlay).
dependsOn(sharedJs)
lazy val shared = (crossProject.crossType(CrossType.Pure) in file("shared")).
settings(scalaVersion := scalaVersionNumber).
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 server", _: State)) compose (onLoad in Global).value
scalacOptions in Test ++= Seq("-Yrangepos")