-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
40 lines (32 loc) · 1.09 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
// Based on https://raw.githubusercontent.com/scala-js/scalajs-cross-compile-example/master/build.sbt
Global / onChangedBuildSource := ReloadOnSourceChanges
ThisBuild / scalaVersion := "2.13.1"
/*
Compile loop for coding:
sbt ~ethmodelJS/compile
Build unoptimized js
sbt ethmodelJS/fastOptJS --> outputs js/target/scala-2.13/ethmodel-fastopt.js{,.map}
Build production js
sbt ethmodelJS/fullOptJS --> outputs js/target/scala-2.13/ethmodel-opt.js{,.map}
Build for jvm
sbt ethmodelJVM/compile
To run a main function in a JS build, see scalaJSUseMainModuleInitializer which we have disabled so as to build in library mode.
*/
lazy val root = project.in(file(".")).
aggregate(ethmodel.js, ethmodel.jvm).
settings(
publish := {},
publishLocal := {},
)
lazy val ethmodel = crossProject(JSPlatform, JVMPlatform).in(file(".")).
settings(
name := "ethmodel",
version := "0.1.1",
).
jvmSettings(
// Add JVM-specific settings here
).
jsSettings(
// Add JS-specific settings here
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.ESModule) }
)