Skip to content

Commit

Permalink
Make use of @js.native def feature for newer Scala.js version and min…
Browse files Browse the repository at this point in the history
…or cleanup in the build
  • Loading branch information
mushtaq committed Sep 23, 2020
1 parent 8822843 commit b9e358e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
8 changes: 3 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ val httpTestSettings: Seq[Setting[_]] = testSettings ++ Seq(
SeleniumJSEnv.Config()
.withMaterializeInServer("tmp", "http://localhost:8080/tmp/")
)
}
},
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.ESModule) }
)

// We'll need the name scalajs-env-selenium for the `seleniumJSEnv` project
Expand Down Expand Up @@ -137,7 +138,4 @@ lazy val seleniumJSEnvTest: Project = project.
lazy val seleniumJSHttpEnvTest: Project = project.
enablePlugins(ScalaJSPlugin).
enablePlugins(ScalaJSJUnitPlugin).
settings(httpTestSettings).
settings(
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.ESModule) }
)
settings(httpTestSettings)
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
package org.scalajs.jsenv.selenium

import scala.scalajs.js
import scala.scalajs.js.annotation.JSImport

object CamelCase {
def hello(input: String): String = s"Hello ${CamelcaseEsModule(input)}!"
def hello(input: String): String = s"Hello ${camelCase(input)}!"

@JSImport("https://cdn.skypack.dev/camelcase@^6.0.0", JSImport.Default)
@js.native
def camelCase(input: String): String = js.native
}

This file was deleted.

0 comments on commit b9e358e

Please sign in to comment.