-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
59 lines (55 loc) · 2.42 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
lazy val server = (project in file("server")).settings(commonSettings).settings(
scalaJSProjects := Seq(client),
Assets / pipelineStages := Seq(scalaJSPipeline),
pipelineStages := Seq(digest, gzip),
// triggers scalaJSPipeline when using compile or continuous compilation
Compile / compile := ((Compile / compile) dependsOn scalaJSPipeline).value,
swaggerDomainNameSpaces := Seq("models"),
libraryDependencies ++= Seq(
"com.vmunier" %% "scalajs-scripts" % "1.2.0",
"com.typesafe.play" %% "play-slick" % "5.0.0",
"com.typesafe.play" %% "play-slick-evolutions" % "5.0.0",
"com.dripower" %% "play-circe" % "2814.2",
"io.circe" %%% "circe-generic" % "0.14.1",
"io.circe" %%% "circe-parser" % "0.14.1",
"com.h2database" % "h2" % "1.4.200",
"com.github.dwickern" %% "swagger-play2.8" % "3.1.0",
"io.swagger" % "swagger-core" % "1.6.2",
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.11.1",
"org.webjars" % "swagger-ui" % "3.51.2",
"org.postgresql" % "postgresql" % "42.2.23",
guice,
"org.scalatestplus.play" %% "scalatestplus-play" % "5.1.0" % "test"
)
).enablePlugins(PlayScala, SwaggerPlugin, WebScalaJSBundlerPlugin)
.disablePlugins(PlayFilters)
.dependsOn(sharedJvm)
lazy val client = (project in file("client")).settings(commonSettings).settings(
scalaJSUseMainModuleInitializer := true,
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "1.1.0",
"com.lihaoyi" %%% "scalatags" % "0.9.4",
"org.querki" %%% "jquery-facade" % "2.0",
"io.circe" %%% "circe-core" % "0.14.1",
"io.circe" %%% "circe-generic" % "0.14.1",
"io.circe" %%% "circe-parser" % "0.14.1",
),
Compile / npmDependencies ++= Seq(
"jquery" -> "3.6.0",
"notifyjs" -> "3.0.0"
)
).enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin)
.dependsOn(sharedJs)
lazy val shared = crossProject(JSPlatform, JVMPlatform)
.crossType(CrossType.Pure)
.in(file("shared"))
.settings(commonSettings)
.jsConfigure(_.enablePlugins(ScalaJSBundlerPlugin))
lazy val sharedJvm = shared.jvm
lazy val sharedJs = shared.js
lazy val commonSettings = Seq(
scalaVersion := "2.12.14",
organization := "com.effe",
)
// loads the server project at sbt startup
onLoad in Global := (onLoad in Global).value andThen { s: State => "project server" :: s }