Skip to content

Commit b9e358e

Browse files
committed
Make use of @js.native def feature for newer Scala.js version and minor cleanup in the build
1 parent 8822843 commit b9e358e

File tree

3 files changed

+11
-16
lines changed

3 files changed

+11
-16
lines changed

build.sbt

+3-5
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ val httpTestSettings: Seq[Setting[_]] = testSettings ++ Seq(
7171
SeleniumJSEnv.Config()
7272
.withMaterializeInServer("tmp", "http://localhost:8080/tmp/")
7373
)
74-
}
74+
},
75+
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.ESModule) }
7576
)
7677

7778
// We'll need the name scalajs-env-selenium for the `seleniumJSEnv` project
@@ -137,7 +138,4 @@ lazy val seleniumJSEnvTest: Project = project.
137138
lazy val seleniumJSHttpEnvTest: Project = project.
138139
enablePlugins(ScalaJSPlugin).
139140
enablePlugins(ScalaJSJUnitPlugin).
140-
settings(httpTestSettings).
141-
settings(
142-
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.ESModule) }
143-
)
141+
settings(httpTestSettings)
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
package org.scalajs.jsenv.selenium
22

3+
import scala.scalajs.js
4+
import scala.scalajs.js.annotation.JSImport
5+
36
object CamelCase {
4-
def hello(input: String): String = s"Hello ${CamelcaseEsModule(input)}!"
7+
def hello(input: String): String = s"Hello ${camelCase(input)}!"
8+
9+
@JSImport("https://cdn.skypack.dev/camelcase@^6.0.0", JSImport.Default)
10+
@js.native
11+
def camelCase(input: String): String = js.native
512
}

seleniumJSHttpEnvTest/src/main/scala/org/scalajs/jsenv/selenium/CamelcaseEsModule.scala

-10
This file was deleted.

0 commit comments

Comments
 (0)