Skip to content

Commit eb7bad7

Browse files
authored
Make selectScript compatible with sbt-web-scalajs v1.2.0 (#52)
1 parent 17056e8 commit eb7bad7

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.4.4
1+
sbt.version=1.5.3

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"
22

3-
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.0")
3+
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.1")
44
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.6.1")
55
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.2")

src/main/twirl/scalajs/selectScript.scala.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66

77
@defining(s"${projectName.toLowerCase}") { name =>
88
@{
9-
val possibleBuildArtifactSuffixes = Seq("opt-bundle", "fastopt-bundle", "opt", "fastopt")
10-
possibleBuildArtifactSuffixes.map(suffix => s"$name-$suffix.js")
11-
.find(resourceExists).map(filename => jsScript(assets(filename), htmlAttributes))
9+
val possibleArtifacts = Seq(s"$name-opt-bundle.js", s"$name-fastopt-bundle.js", s"$name-opt/main.js", s"$name-fastopt/main.js")
10+
possibleArtifacts.find(resourceExists).map(filename => jsScript(assets(filename), htmlAttributes))
1211
}
1312
}

0 commit comments

Comments
 (0)