summaryrefslogtreecommitdiff
path: root/examples/crossBuilds/clientserver/build.sbt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/crossBuilds/clientserver/build.sbt')
-rw-r--r--examples/crossBuilds/clientserver/build.sbt23
1 files changed, 16 insertions, 7 deletions
diff --git a/examples/crossBuilds/clientserver/build.sbt b/examples/crossBuilds/clientserver/build.sbt
index 434fb42..618ac8a 100644
--- a/examples/crossBuilds/clientserver/build.sbt
+++ b/examples/crossBuilds/clientserver/build.sbt
@@ -1,25 +1,34 @@
import utest.jsrunner.JsCrossBuild
import scala.scalajs.sbtplugin.ScalaJSPlugin._
import ScalaJSKeys._
-
-val cross = new JsCrossBuild(
- // Shared settings here
+val sharedSettings = Seq(
+ unmanagedSourceDirectories in Compile +=
+ baseDirectory.value / "shared" / "main" / "scala",
+ libraryDependencies ++= Seq(
+ "com.scalatags" %%% "scalatags" % "0.4.2",
+ "com.lihaoyi" %%% "upickle" % "0.2.5"
+ )
)
-lazy val js = cross.js.settings(
+lazy val client = project.in(file("client"))
+ .settings(scalaJSSettings:_*)
+ .settings(sharedSettings:_*)
+ .settings(
libraryDependencies ++= Seq(
"org.scala-lang.modules.scalajs" %%% "scalajs-dom" % "0.6"
)
)
-lazy val jvm = cross.jvm.settings(
+lazy val server = project.in(file("server"))
+ .settings(sharedSettings:_*)
+ .settings(
libraryDependencies ++= Seq(
"io.spray" %% "spray-can" % "1.3.2",
"io.spray" %% "spray-routing" % "1.3.2",
"com.typesafe.akka" %% "akka-actor" % "2.3.6"
),
(resources in Compile) += {
- (fastOptJS in (js, Compile)).value
- (artifactPath in (js, Compile, fastOptJS)).value
+ (fastOptJS in (client, Compile)).value
+ (artifactPath in (client, Compile, fastOptJS)).value
}
)