Skip to content

Commit 5fdce8e

Browse files
authored
Merge pull request #353 from sjrd/upgrades
Upgrades.
2 parents ef1f303 + 10d77e9 commit 5fdce8e

File tree

5 files changed

+32
-27
lines changed

5 files changed

+32
-27
lines changed

.travis.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,21 @@ language: scala
33
script:
44
- sbt ++$TRAVIS_SCALA_VERSION package doc example/compile
55
- sbt scalafmtTest
6-
- sbt ++2.11.11 readme/run
6+
- sbt ++2.11.12 readme/run
77
scala:
88
- 2.10.7
99
- 2.11.12
10-
- 2.12.6
11-
- 2.13.0-M3
12-
- 2.13.0-M4
10+
- 2.12.8
11+
- 2.13.0-RC1
1312
jdk:
1413
- oraclejdk8
1514
env:
16-
- SCALAJS_VERSION=0.6.23
17-
- SCALAJS_VERSION=1.0.0-M3
15+
- SCALAJS_VERSION=0.6.27
16+
- SCALAJS_VERSION=1.0.0-M7
1817
matrix:
1918
exclude:
2019
- scala: 2.10.7
21-
env: SCALAJS_VERSION=1.0.0-M3
22-
- scala: 2.13.0-M4
23-
env: SCALAJS_VERSION=1.0.0-M3
20+
env: SCALAJS_VERSION=1.0.0-M7
2421

2522
cache:
2623
directories:

build.sbt

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,24 @@ lazy val root = project.in(file(".")).
66
name := "Scala.js DOM"
77

88
crossScalaVersions in ThisBuild := {
9-
if (scalaJSVersion.startsWith("1.")) Seq("2.12.6", "2.11.12", "2.13.0-M3")
10-
else Seq("2.12.6", "2.11.12", "2.10.7", "2.13.0-M3", "2.13.0-M4")
9+
if (scalaJSVersion.startsWith("1.")) Seq("2.12.8", "2.11.12", "2.13.0-RC1")
10+
else Seq("2.12.8", "2.11.12", "2.10.7", "2.13.0-RC1")
1111
}
1212
scalaVersion in ThisBuild := crossScalaVersions.value.head
1313

1414
val commonSettings = Seq(
1515
version := "0.9.7-SNAPSHOT",
1616
organization := "org.scala-js",
17-
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings")
17+
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings"),
18+
19+
// Work around https://github.com/scala-js/scala-js/issues/3612
20+
scalacOptions in (Compile, doc) := {
21+
val prev = (scalacOptions in (Compile, doc)).value
22+
if (scalaJSVersion.startsWith("0.6.") && scalaVersion.value.startsWith("2.13."))
23+
prev.filter(_ != "-Xfatal-warnings")
24+
else
25+
prev
26+
}
1827
)
1928

2029
normalizedName := "scalajs-dom"
@@ -38,8 +47,7 @@ scalacOptions ++= {
3847
def hasNewCollections(version: String): Boolean = {
3948
!version.startsWith("2.10.") &&
4049
!version.startsWith("2.11.") &&
41-
!version.startsWith("2.12.") &&
42-
version != "2.13.0-M3"
50+
!version.startsWith("2.12.")
4351
}
4452

4553
/** Returns the appropriate subdirectory of `sourceDir` depending on whether

example/src/main/scala/example/Example.scala

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import scala.scalajs.js.annotation._
55
import org.scalajs.dom
66
import dom.html
77

8-
@JSExportTopLevel("example.Alert")
8+
@JSExportTopLevel("ExampleAlert")
99
object Alert {
1010
@JSExport
1111
def main() = {
@@ -14,7 +14,7 @@ object Alert {
1414
}
1515
}
1616

17-
@JSExportTopLevel("example.NodeAppendChild")
17+
@JSExportTopLevel("ExampleNodeAppendChild")
1818
object NodeAppendChild {
1919
@JSExport
2020
def main(div: html.Div) = {
@@ -28,7 +28,7 @@ object NodeAppendChild {
2828
}
2929
}
3030

31-
@JSExportTopLevel("example.ElementStyle")
31+
@JSExportTopLevel("ExampleElementStyle")
3232
object ElementStyle {
3333
@JSExport
3434
def main(div: html.Div) = {
@@ -43,7 +43,7 @@ object ElementStyle {
4343
}
4444
}
4545

46-
@JSExportTopLevel("example.LocalStorage")
46+
@JSExportTopLevel("ExampleLocalStorage")
4747
object LocalStorage {
4848
@JSExport
4949
def main(in: html.Input, box: html.Div) = {
@@ -62,7 +62,7 @@ object LocalStorage {
6262
}
6363
}
6464

65-
@JSExportTopLevel("example.Canvas")
65+
@JSExportTopLevel("ExampleCanvas")
6666
object Canvas {
6767
@JSExport
6868
def main(c: html.Canvas) = {
@@ -88,7 +88,7 @@ object Canvas {
8888
}
8989
}
9090

91-
@JSExportTopLevel("example.Base64")
91+
@JSExportTopLevel("ExampleBase64")
9292
object Base64 {
9393
@JSExport
9494
def main(in: html.Input,
@@ -100,7 +100,7 @@ object Base64 {
100100
}
101101
}
102102

103-
@JSExportTopLevel("example.EventHandler")
103+
@JSExportTopLevel("ExampleEventHandler")
104104
object EventHandler{
105105
@JSExport
106106
def main(pre: html.Pre) = {
@@ -118,7 +118,7 @@ object EventHandler{
118118
}
119119
}
120120

121-
@JSExportTopLevel("example.XMLHttpRequest")
121+
@JSExportTopLevel("ExampleXMLHttpRequest")
122122
object XMLHttpRequest{
123123
@JSExport
124124
def main(pre: html.Pre) = {
@@ -137,7 +137,7 @@ object XMLHttpRequest{
137137
}
138138
}
139139

140-
@JSExportTopLevel("example.Websocket")
140+
@JSExportTopLevel("ExampleWebsocket")
141141
object Websocket {
142142
@JSExport
143143
def main(in: html.Input,
@@ -157,7 +157,7 @@ object Websocket {
157157
}
158158
}
159159

160-
@JSExportTopLevel("example.AjaxExtension")
160+
@JSExportTopLevel("ExampleAjaxExtension")
161161
object AjaxExtension {
162162
@JSExport
163163
def main(pre: html.Pre) = {

project/build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
val scalaJSVersion =
2-
Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.23")
2+
Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.27")
33

44
addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
55

readme/Index.scalatex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
),
2424
div(width:="50%", float.left, padding:="8px", boxSizing.`border-box`)(
2525
if (!autorun)
26-
a(cls:="pure-button", onclick:=s"example.$example.main($queries)", "Run"),
26+
a(cls:="pure-button", onclick:=s"Example$example.main($queries)", "Run"),
2727
div(
2828
frags.zip(ids).map{case (f, i) => f(id:=i, backgroundColor:="#fafafa")}
2929
),
3030
if (autorun)
31-
script(s"example.$example.main($queries)")
31+
script(s"Example$example.main($queries)")
3232
),
3333
div(clear.both)
3434
)

0 commit comments

Comments
 (0)