Skip to content

Commit 1c7a60e

Browse files
committed
Bundler-only demo
1 parent 016f3d7 commit 1c7a60e

File tree

6 files changed

+8
-62
lines changed

6 files changed

+8
-62
lines changed

example/build.sbt

Lines changed: 4 additions & 40 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.1",
4+
version := "3.0.2",
55
organization := "io.udash",
66
))
77

88
val commonSettings = Seq(
99
scalaVersion := "2.12.10",
10-
crossScalaVersions := Seq("2.12.10"), //todo 2.13
10+
crossScalaVersions := Seq("2.12.10"), //todo 2.13 & SJS 1.0 with Udash 0.9
1111
scalacOptions ++= Seq(
1212
"-feature",
1313
"-deprecation",
@@ -33,46 +33,10 @@ val root = project.in(file("."))
3333
.enablePlugins(ScalaJSPlugin)
3434
.settings(commonSettings)
3535

36-
val `jquery-global-demo` = project.in(file("global-demo"))
37-
.enablePlugins(ScalaJSPlugin)
38-
.settings(
39-
commonSettings,
40-
41-
jsDependencies ++= Dependencies.jsDeps.value,
42-
43-
sourceDirsSettings(_.getParentFile),
44-
45-
/* move these files out of target/. */
46-
Compile / fullOptJS / crossTarget := generatedGlobalDir,
47-
Compile / fastOptJS / crossTarget := generatedGlobalDir,
48-
Compile / packageJSDependencies / crossTarget := generatedGlobalDir,
49-
Compile / packageMinifiedJSDependencies / crossTarget := generatedGlobalDir,
50-
51-
Compile / fastOptJS := (Compile / fastOptJS).dependsOn(copyAssets).value,
52-
Compile / fullOptJS := (Compile / fullOptJS).dependsOn(copyAssets).value,
53-
54-
scalaJSUseMainModuleInitializer := true,
55-
56-
copyAssets := {
57-
IO.copyFile(
58-
sourceDirectory.value / "main/assets/index.html",
59-
generatedGlobalDir / "index.html"
60-
)
61-
},
62-
63-
Compile / fastOptJS / artifactPath :=
64-
(Compile / fastOptJS / crossTarget).value / "scripts" / "frontend-impl.js",
65-
Compile / fullOptJS / artifactPath :=
66-
(Compile / fullOptJS / crossTarget).value / "scripts" / "frontend-impl.js",
67-
Compile / packageJSDependencies / artifactPath :=
68-
(Compile / packageJSDependencies / crossTarget).value / "scripts" / "frontend-deps.js",
69-
Compile / packageMinifiedJSDependencies / artifactPath :=
70-
(Compile / packageMinifiedJSDependencies / crossTarget).value / "scripts" / "frontend-deps.js"
71-
)
72-
7336
val generatedBundlerDir = file("generated/bundler")
7437
val compileStatics = taskKey[Unit]("Compiles all static files.")
75-
val `jquery-bundler-demo` = project.in(file("bundler-demo"))
38+
39+
val example = project.in(file("."))
7640
.enablePlugins(ScalaJSBundlerPlugin)
7741
.settings(
7842
commonSettings,

example/global-demo/src/main/assets/index.html

Lines changed: 0 additions & 13 deletions
This file was deleted.

example/project/Dependencies.scala

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

54
object Dependencies {
6-
val udashCoreVersion = "0.8.1"
5+
val udashCoreVersion = "0.8.3"
76
val udashJQueryVersion = "3.0.2"
87

98
val deps = Def.setting(Seq[ModuleID](
109
"io.udash" %%% "udash-core" % udashCoreVersion,
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/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# suppress inspection "UnusedProperty"
2-
sbt.version=1.3.2
2+
sbt.version=1.3.8

example/project/plugins.sbt

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

3-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.29")
4-
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.15.0-0.6")
3+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.32")
4+
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler-sjs06" % "0.17.0")
File renamed without changes.

0 commit comments

Comments
 (0)