-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
54 lines (46 loc) · 1.29 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
val ScalaVer = "2.11.7"
val ScalaJSDom = "0.9.1"
val SubScript = "3.0.5-SNAPSHOT"
scalaVersion in ThisBuild := ScalaVer
val jsPath = file("assets") / "js"
lazy val commonSettings = Seq(
name := "JS Hello World"
, version := "0.1.0"
, scalaVersion := ScalaVer
, scalacOptions ++= Seq(
"-deprecation",
"-encoding", "UTF-8",
"-feature",
"-language:existentials",
"-language:higherKinds",
"-language:implicitConversions",
"-language:experimental.macros",
"-unchecked",
// "-Xfatal-warnings",
"-Xlint",
// "-Yinline-warnings",
"-Ywarn-dead-code",
"-Xfuture")
)
lazy val root = project.in(file(".")).
aggregate(js, jvm)
.settings(
publish := {},
publishLocal := {}
)
lazy val jshelloworld = crossProject.in(file("."))
.settings(commonSettings)
.settings(SubscriptSbt.projectSettings)
.settings(
initialCommands := "import jshelloworld._"
, libraryDependencies += "org.subscript-lang" %%% "subscript-core" % SubScript
)
.jsSettings(
scalaJSUseMainModuleInitializer := true
, libraryDependencies ++= Seq(
"org.scala-js" %%% "scalajs-dom" % ScalaJSDom
)
, artifactPath in (Compile, fastOptJS) := jsPath / "application.js"
)
lazy val jvm = jshelloworld.jvm
lazy val js = jshelloworld.js