aboutsummaryrefslogtreecommitdiff
path: root/build.sc
diff options
context:
space:
mode:
authorJakob Odersky <jakob@inpher.io>2019-11-26 00:03:43 -0500
committerJakob Odersky <jakob@inpher.io>2019-11-26 13:40:36 -0500
commitf38dd59d93f56213a8400841c7ebb0a7202144a7 (patch)
treea697acc765cf6203eb0a499601185d1303da8939 /build.sc
parent2f298c65846b2f62b9b40cd23f11971b301829f3 (diff)
downloadscala-tutorial-f38dd59d93f56213a8400841c7ebb0a7202144a7.tar.gz
scala-tutorial-f38dd59d93f56213a8400841c7ebb0a7202144a7.tar.bz2
scala-tutorial-f38dd59d93f56213a8400841c7ebb0a7202144a7.zip
Share model across fe and be and add websocket support
Diffstat (limited to 'build.sc')
-rw-r--r--build.sc22
1 files changed, 17 insertions, 5 deletions
diff --git a/build.sc b/build.sc
index 10354e9..3799ef2 100644
--- a/build.sc
+++ b/build.sc
@@ -1,11 +1,23 @@
import mill._, scalalib._, scalajslib._
-object server extends ScalaModule {
- def scalaVersion = "2.13.1"
+trait Shared extends ScalaModule {
+ def sharedSources = T.sources(build.millSourcePath / "shared")
+
+ def sources = T.sources(
+ super.sources() ++ sharedSources()
+ )
def ivyDeps = Agg(
+ ivy"com.lihaoyi::scalatags::0.7.0", // html rendering DSL http://www.lihaoyi.com/scalatags/
+ ivy"com.lihaoyi::upickle::0.8.0" // json serializatio, is also included by cask http://www.lihaoyi.com/upickle/
+ )
+}
+
+object server extends ScalaModule with Shared {
+ def scalaVersion = "2.13.1"
+
+ def ivyDeps = super.ivyDeps() ++ Agg(
ivy"com.lihaoyi::cask:0.3.6", // web framework, http://www.lihaoyi.com/cask/
- ivy"com.lihaoyi::scalatags:0.7.0", // html rendering DSL http://www.lihaoyi.com/scalatags/
ivy"io.getquill::quill-jdbc:3.4.10", // language integrated queries https://getquill.io/#docs
ivy"org.xerial:sqlite-jdbc:3.28.0" // actual database driver, note the single ':'
)
@@ -18,11 +30,11 @@ object server extends ScalaModule {
}
-object webapp extends ScalaJSModule {
+object webapp extends ScalaJSModule with Shared {
def scalaVersion = "2.13.1"
def scalaJSVersion = "0.6.31" // https://www.scala-js.org/
- def ivyDeps = Agg(
+ def ivyDeps = super.ivyDeps() ++ Agg(
ivy"org.scala-js::scalajs-dom::0.9.7" // http://scala-js.github.io/scala-js-dom/
)