-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
41 lines (36 loc) · 1.66 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
import org.scalajs.sbtplugin.ScalaJSPlugin.AutoImport.jsDependencies
lazy val server =
(project in file("server")).settings(commonSettings).settings(
scalaJSProjects := Seq(client),
pipelineStages in Assets := Seq(scalaJSPipeline),
pipelineStages := Seq(digest, gzip),
compile in Compile := ((compile in Compile) dependsOn scalaJSPipeline).value,
libraryDependencies ++= Seq(
"com.vmunier" %% "scalajs-scripts" % "1.1.1",
"com.github.benhutchison" %% "prickle" % "1.1.13",
specs2 % Test,
guice
),
).enablePlugins(PlayScala)
.dependsOn(sharedJvm)
lazy val client = (project in file("client")).settings(commonSettings).settings(
scalaJSUseMainModuleInitializer := true,
libraryDependencies ++= Seq(
"com.softwaremill.macwire" %% "macros" % "2.3.0",
"org.scala-js" %%% "scalajs-dom" % "0.9.1",
"be.doeraene" %%% "scalajs-jquery" % "0.9.1",
"com.github.benhutchison" %%% "prickle" % "1.1.13"
),
skip in packageJSDependencies := false,
jsDependencies += "org.webjars" % "jquery" % "2.1.4" / "2.1.4/jquery.js"
).enablePlugins(ScalaJSPlugin, ScalaJSWeb)
.dependsOn(sharedJs)
lazy val shared = (crossProject.crossType(CrossType.Pure) in file("shared")).settings(commonSettings)
lazy val sharedJvm = shared.jvm
lazy val sharedJs = shared.js
lazy val commonSettings = Seq(
scalaVersion := "2.12.4",
organization := "com.github.bsoptei"
)
// loads the server project at sbt startup
onLoad in Global := (onLoad in Global).value andThen {s: State => "project server" :: s}