Skip to content

Commit 3800211

Browse files
committed
Use locally published snapshot with Scala 2.13 and SJS 1.0
1 parent 06ca2e3 commit 3800211

File tree

3 files changed

+13
-15
lines changed

3 files changed

+13
-15
lines changed

example/build.sbt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name := "jquery-demo"
22

33
inThisBuild(Seq(
4-
version := "3.0.2",
4+
version := "3.0.0-SNAPSHOT",
55
organization := "io.udash",
66
))
77

88
val commonSettings = Seq(
9-
scalaVersion := "2.12.10",
10-
crossScalaVersions := Seq("2.12.10"), //todo 2.13 & SJS 1.0 with Udash 0.9
9+
scalaVersion := "2.12.11",
10+
crossScalaVersions := Seq("2.13.1"),
1111
scalacOptions ++= Seq(
1212
"-feature",
1313
"-deprecation",
@@ -34,17 +34,17 @@ val copyAssets = taskKey[Unit]("Copies all assets to the target directory.")
3434
lazy val root = project.in(file("."))
3535
.enablePlugins(ScalaJSPlugin)
3636
.settings(commonSettings)
37+
.aggregate(`jquery-bundler-demo`, `jquery-global-demo`)
3738

3839
lazy val `jquery-global-demo` = project.in(file("global-demo"))
39-
.enablePlugins(ScalaJSPlugin)
40+
.enablePlugins(ScalaJSPlugin, JSDependenciesPlugin)
4041
.settings(
4142
commonSettings,
4243

43-
jsDependencies ++= Dependencies.jsDeps.value,
44-
4544
sourceDirsSettings(_.getParentFile),
4645

47-
/* move these files out of target/. */
46+
cleanFiles += generatedGlobalDir,
47+
4848
Compile / fullOptJS / crossTarget := generatedGlobalDir,
4949
Compile / fastOptJS / crossTarget := generatedGlobalDir,
5050
Compile / packageJSDependencies / crossTarget := generatedGlobalDir,
@@ -91,6 +91,8 @@ lazy val `jquery-bundler-demo` = project.in(file("bundler-demo"))
9191
)
9292
},
9393

94+
cleanFiles += generatedBundlerDir,
95+
9496
compileStatics := {
9597
val sjsFileName = (Compile / fastOptJS).value.data.name.stripSuffix(".js")
9698
IO.copyFile(

example/project/Dependencies.scala

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
import org.portablescala.sbtplatformdeps.PlatformDepsPlugin.autoImport._
2-
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
32
import sbt._
43

54
object Dependencies {
65
val scalatagsVersion = "0.8.6"
7-
val udashJQueryVersion = "3.0.2"
6+
val udashJQueryVersion = "3.0.0-SNAPSHOT"
87

98
val deps = Def.setting(Seq[ModuleID](
109
"com.lihaoyi" %%% "scalatags" % scalatagsVersion,
1110
"io.udash" %%% "udash-jquery" % udashJQueryVersion
1211
))
13-
14-
val jsDeps = Def.setting(Seq[org.scalajs.sbtplugin.JSModuleID](
15-
"org.webjars" % "jquery" % "3.3.1" / "3.3.1/jquery.js" minified "3.3.1/jquery.min.js"
16-
))
1712
}

example/project/plugins.sbt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
logLevel := Level.Warn
22

3-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.32")
4-
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler-sjs06" % "0.17.0")
3+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.1")
4+
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.17.0")
5+
addSbtPlugin("org.scala-js" % "sbt-jsdependencies" % "1.0.0")

0 commit comments

Comments
 (0)