Skip to content

Upgrades. #353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,21 @@ language: scala
script:
- sbt ++$TRAVIS_SCALA_VERSION package doc example/compile
- sbt scalafmtTest
- sbt ++2.11.11 readme/run
- sbt ++2.11.12 readme/run
scala:
- 2.10.7
- 2.11.12
- 2.12.6
- 2.13.0-M3
- 2.13.0-M4
- 2.12.8
- 2.13.0-RC1
jdk:
- oraclejdk8
env:
- SCALAJS_VERSION=0.6.23
- SCALAJS_VERSION=1.0.0-M3
- SCALAJS_VERSION=0.6.27
- SCALAJS_VERSION=1.0.0-M7
matrix:
exclude:
- scala: 2.10.7
env: SCALAJS_VERSION=1.0.0-M3
- scala: 2.13.0-M4
env: SCALAJS_VERSION=1.0.0-M3
env: SCALAJS_VERSION=1.0.0-M7

cache:
directories:
Expand Down
18 changes: 13 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,24 @@ lazy val root = project.in(file(".")).
name := "Scala.js DOM"

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

val commonSettings = Seq(
version := "0.9.7-SNAPSHOT",
organization := "org.scala-js",
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings")
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings"),

// Work around https://github.com/scala-js/scala-js/issues/3612
scalacOptions in (Compile, doc) := {
val prev = (scalacOptions in (Compile, doc)).value
if (scalaJSVersion.startsWith("0.6.") && scalaVersion.value.startsWith("2.13."))
prev.filter(_ != "-Xfatal-warnings")
else
prev
}
)

normalizedName := "scalajs-dom"
Expand All @@ -38,8 +47,7 @@ scalacOptions ++= {
def hasNewCollections(version: String): Boolean = {
!version.startsWith("2.10.") &&
!version.startsWith("2.11.") &&
!version.startsWith("2.12.") &&
version != "2.13.0-M3"
!version.startsWith("2.12.")
}

/** Returns the appropriate subdirectory of `sourceDir` depending on whether
Expand Down
20 changes: 10 additions & 10 deletions example/src/main/scala/example/Example.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import scala.scalajs.js.annotation._
import org.scalajs.dom
import dom.html

@JSExportTopLevel("example.Alert")
@JSExportTopLevel("ExampleAlert")
object Alert {
@JSExport
def main() = {
Expand All @@ -14,7 +14,7 @@ object Alert {
}
}

@JSExportTopLevel("example.NodeAppendChild")
@JSExportTopLevel("ExampleNodeAppendChild")
object NodeAppendChild {
@JSExport
def main(div: html.Div) = {
Expand All @@ -28,7 +28,7 @@ object NodeAppendChild {
}
}

@JSExportTopLevel("example.ElementStyle")
@JSExportTopLevel("ExampleElementStyle")
object ElementStyle {
@JSExport
def main(div: html.Div) = {
Expand All @@ -43,7 +43,7 @@ object ElementStyle {
}
}

@JSExportTopLevel("example.LocalStorage")
@JSExportTopLevel("ExampleLocalStorage")
object LocalStorage {
@JSExport
def main(in: html.Input, box: html.Div) = {
Expand All @@ -62,7 +62,7 @@ object LocalStorage {
}
}

@JSExportTopLevel("example.Canvas")
@JSExportTopLevel("ExampleCanvas")
object Canvas {
@JSExport
def main(c: html.Canvas) = {
Expand All @@ -88,7 +88,7 @@ object Canvas {
}
}

@JSExportTopLevel("example.Base64")
@JSExportTopLevel("ExampleBase64")
object Base64 {
@JSExport
def main(in: html.Input,
Expand All @@ -100,7 +100,7 @@ object Base64 {
}
}

@JSExportTopLevel("example.EventHandler")
@JSExportTopLevel("ExampleEventHandler")
object EventHandler{
@JSExport
def main(pre: html.Pre) = {
Expand All @@ -118,7 +118,7 @@ object EventHandler{
}
}

@JSExportTopLevel("example.XMLHttpRequest")
@JSExportTopLevel("ExampleXMLHttpRequest")
object XMLHttpRequest{
@JSExport
def main(pre: html.Pre) = {
Expand All @@ -137,7 +137,7 @@ object XMLHttpRequest{
}
}

@JSExportTopLevel("example.Websocket")
@JSExportTopLevel("ExampleWebsocket")
object Websocket {
@JSExport
def main(in: html.Input,
Expand All @@ -157,7 +157,7 @@ object Websocket {
}
}

@JSExportTopLevel("example.AjaxExtension")
@JSExportTopLevel("ExampleAjaxExtension")
object AjaxExtension {
@JSExport
def main(pre: html.Pre) = {
Expand Down
2 changes: 1 addition & 1 deletion project/build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
val scalaJSVersion =
Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.23")
Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.27")

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

Expand Down
4 changes: 2 additions & 2 deletions readme/Index.scalatex
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
),
div(width:="50%", float.left, padding:="8px", boxSizing.`border-box`)(
if (!autorun)
a(cls:="pure-button", onclick:=s"example.$example.main($queries)", "Run"),
a(cls:="pure-button", onclick:=s"Example$example.main($queries)", "Run"),
div(
frags.zip(ids).map{case (f, i) => f(id:=i, backgroundColor:="#fafafa")}
),
if (autorun)
script(s"example.$example.main($queries)")
script(s"Example$example.main($queries)")
),
div(clear.both)
)
Expand Down