Skip to content

Commit a7ea10c

Browse files
author
Mateusz Starzec
committed
Docs
1 parent f8e3a24 commit a7ea10c

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Static types for the jQuery API for [Scala.js](http://www.scala-js.org/) program
77
Add 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

1313
then import the jQuery package:
@@ -16,8 +16,10 @@ then import the jQuery package:
1616
import 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"

example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The `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?

example/build.sbt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,15 @@ val commonSettings = Seq(
3434

3535
val generatedGlobalDir = file("generated/global")
3636
val 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),

0 commit comments

Comments
 (0)