File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Static types for the jQuery API for [Scala.js](http://www.scala-js.org/) program
77Add the following dependency to your SBT build:
88
99``` scala
10- libraryDependencies += " io.udash" %%% " udash-jquery" % " 2 .0.0"
10+ libraryDependencies += " io.udash" %%% " udash-jquery" % " 3 .0.0"
1111```
1212
1313then import the jQuery package:
@@ -16,8 +16,10 @@ then import the jQuery package:
1616import io .udash .wrappers .jquery ._
1717```
1818
19- Since version ` 2.0.0 ` the wrapper does not force JS dependency on jQuery. You have to
20- add it manually by:
19+ Since version ` 3.0.0 ` the wrapper is published as a CommonJS module with JS dependencies managed
20+ by [ scalajs-bundler] ( https://github.com/scalacenter/scalajs-bundler ) .
21+
22+ If you do not want to use the bundler, you have to include jQuery sources manually by:
2123 * explicit link in your ` index.html ` .
2224 ``` html
2325 <script src =" https://code.jquery.com/jquery-3.3.1.min.js"
Original file line number Diff line number Diff line change 11The ` build.sbt ` file contains two configurations:
2- * ` jquery-demo ` uses global jQuery dependency.
2+ * ` jquery-global- demo ` uses global jQuery dependency.
33* ` jquery-bundler-demo ` uses ` ScalaJSBundlerPlugin ` in order to manage module dependencies.
44
55### How to use?
Original file line number Diff line number Diff line change @@ -34,13 +34,15 @@ val commonSettings = Seq(
3434
3535val generatedGlobalDir = file(" generated/global" )
3636val copyAssets = taskKey[Unit ](" Copies all assets to the target directory." )
37- val root = project.in(file(" ." )).enablePlugins(ScalaJSPlugin )
37+ val root = project.in(file(" ." ))
38+ .enablePlugins(ScalaJSPlugin )
3839 .settings(commonSettings)
3940
40- val `jquery-global-demo` = project.in(file(" global-demo" )).enablePlugins(ScalaJSPlugin )
41+ val `jquery-global-demo` = project.in(file(" global-demo" ))
42+ .enablePlugins(ScalaJSPlugin )
4143 .settings(
4244 commonSettings,
43-
45+
4446 jsDependencies ++= Dependencies .jsDeps.value,
4547
4648 sourceDirsSettings(_.getParentFile),
You can’t perform that action at this time.
0 commit comments