diff options
author | Jakob Odersky <jakob@odersky.com> | 2016-11-13 14:02:14 -0800 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2016-11-13 14:02:14 -0800 |
commit | e317debf1a5d639c9a5fde0f0353a7b3b7ae86a0 (patch) | |
tree | fd0821029975be254ebe47565fae0e991d443151 /build.sbt | |
parent | 4e5778cac0a8be14b072a3626567ad6342d9ce31 (diff) | |
download | play-scalajs-chat-e317debf1a5d639c9a5fde0f0353a7b3b7ae86a0.tar.gz play-scalajs-chat-e317debf1a5d639c9a5fde0f0353a7b3b7ae86a0.tar.bz2 play-scalajs-chat-e317debf1a5d639c9a5fde0f0353a7b3b7ae86a0.zip |
Basic composite app with uPickle
Diffstat (limited to 'build.sbt')
-rw-r--r-- | build.sbt | 40 |
1 files changed, 29 insertions, 11 deletions
@@ -1,17 +1,35 @@ -name := """play-scalajs-chat""" -organization := "com.lihaoyi" - version := "1.0-SNAPSHOT" +organization in ThisBuild := "com.lihaoyi" +scalaVersion in ThisBuild := "2.11.8" -lazy val root = (project in file(".")).enablePlugins(PlayScala) +lazy val server = (project in file("server")) + .enablePlugins(PlayScala) + .settings( + scalaJSProjects := Seq(client), + pipelineStages in Assets := Seq(scalaJSPipeline), + // triggers scalaJSPipeline when using compile or continuous compilation + compile in Compile := ((compile in Compile) dependsOn scalaJSPipeline).value, + libraryDependencies += "com.lihaoyi" %%% "upickle" % "0.4.3" + ) + .dependsOn(sharedJvm) -scalaVersion := "2.11.8" +lazy val client = (project in file("client")) + .enablePlugins(ScalaJSPlugin, ScalaJSWeb) + .settings( + persistLauncher := true, + persistLauncher in Test := false, + libraryDependencies ++= Seq( + "org.scala-js" %%% "scalajs-dom" % "0.9.1", + "com.lihaoyi" %%% "upickle" % "0.4.3" + ) + ) + .dependsOn(sharedJs) -libraryDependencies += filters -libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "1.5.1" % Test +lazy val shared = (crossProject.crossType(CrossType.Pure) in file("shared")) + .jsConfigure(_ enablePlugins ScalaJSWeb) -// Adds additional packages into Twirl -//TwirlKeys.templateImports += "com.lihaoyi.controllers._" +lazy val sharedJvm = shared.jvm +lazy val sharedJs = shared.js -// Adds additional packages into conf/routes -// play.sbt.routes.RoutesKeys.routesImport += "com.lihaoyi.binders._" +// loads the server project at sbt startup +onLoad in Global := (Command.process("project server", _: State)) compose (onLoad in Global).value |