-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
62 lines (53 loc) · 1.76 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
60
61
62
import org.scalajs.linker.interface.ModuleSplitStyle
ThisBuild / scalaVersion := "2.13.10"
val circeVersion = "0.14.5"
val slinkyVersion = "0.7.3"
lazy val commonSettings = Seq(
scalacOptions ++= Seq("-encoding", "utf-8", "-deprecation", "-feature"),
// We have a `main` method
scalaJSUseMainModuleInitializer := true,
// Emit modules in the most Vite-friendly way.
// For the best feedback loop with Vite,
// it is recommended to emit small modules for application code.
scalaJSLinkerConfig ~= {
_.withModuleKind(ModuleKind.ESModule)
.withModuleSplitStyle(
ModuleSplitStyle.SmallModulesFor(List("scalafui"))
)
},
libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % "2.4.0",
"org.scala-js" %%% "scala-js-macrotask-executor" % "1.0.0",
"me.shadaj" %%% "slinky-web" % slinkyVersion,
"me.shadaj" %%% "slinky-hot" % slinkyVersion,
"io.circe" %%% "circe-core" % circeVersion,
"io.circe" %%% "circe-generic" % circeVersion,
"io.circe" %%% "circe-parser" % circeVersion,
"org.typelevel" %%% "cats-effect" % "3.4.5",
"org.scalatest" %%% "scalatest" % "3.2.9" % Test
)
)
lazy val scalafui = project
.in(file("."))
.enablePlugins(ScalaJSPlugin)
.settings(commonSettings)
lazy val exampleTodo = project
.in(file("examples/todo"))
.enablePlugins(ScalaJSPlugin)
.settings(commonSettings)
.dependsOn(scalafui)
lazy val exampleMultipage = project
.in(file("examples/multipage"))
.enablePlugins(ScalaJSPlugin)
.settings(
commonSettings,
libraryDependencies ++= Seq(
"tech.sparse" %%% "trail" % "0.3.1"
)
)
.dependsOn(scalafui)
lazy val exampleStopwatch = project
.in(file("examples/stopwatch"))
.enablePlugins(ScalaJSPlugin)
.settings(commonSettings)
.dependsOn(scalafui)