File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
jsdom-nodejs-env/src/main/scala/org/scalajs/jsenv/jsdomnodejs Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class JSDOMNodeJSEnv(config: JSDOMNodeJSEnv.Config) extends JSEnv {
3030
3131 val name : String = " Node.js with JSDOM"
3232
33- def start (input : Input , runConfig : RunConfig ): JSRun = {
33+ def start (input : Seq [ Input ] , runConfig : RunConfig ): JSRun = {
3434 JSDOMNodeJSEnv .validator.validate(runConfig)
3535 val scripts = validateInput(input)
3636 try {
@@ -41,7 +41,7 @@ class JSDOMNodeJSEnv(config: JSDOMNodeJSEnv.Config) extends JSEnv {
4141 }
4242 }
4343
44- def startWithCom (input : Input , runConfig : RunConfig ,
44+ def startWithCom (input : Seq [ Input ] , runConfig : RunConfig ,
4545 onMessage : String => Unit ): JSComRun = {
4646 JSDOMNodeJSEnv .validator.validate(runConfig)
4747 val scripts = validateInput(input)
@@ -50,13 +50,14 @@ class JSDOMNodeJSEnv(config: JSDOMNodeJSEnv.Config) extends JSEnv {
5050 }
5151 }
5252
53- private def validateInput (input : Input ): List [Path ] = {
54- input match {
55- case Input .ScriptsToLoad (scripts) =>
56- scripts
53+ private def validateInput (input : Seq [Input ]): List [Path ] = {
54+ input.map {
55+ case Input .Script (script) =>
56+ script
57+
5758 case _ =>
5859 throw new UnsupportedInputException (input)
59- }
60+ }.toList
6061 }
6162
6263 private def internalStart (files : List [Path ], runConfig : RunConfig ): JSRun = {
Original file line number Diff line number Diff line change 1- addSbtPlugin(" org.scala-js" % " sbt-scalajs" % " 1.0.0-M8 " )
1+ addSbtPlugin(" org.scala-js" % " sbt-scalajs" % " 1.0.0-RC1 " )
22
3- libraryDependencies += " org.scala-js" %% " scalajs-env-nodejs" % " 1.0.0-M8 "
3+ libraryDependencies += " org.scala-js" %% " scalajs-env-nodejs" % " 1.0.0-RC1 "
44
55unmanagedSourceDirectories in Compile +=
66 baseDirectory.value.getParentFile / " jsdom-nodejs-env/src/main/scala"
You can’t perform that action at this time.
0 commit comments