File tree 3 files changed +11
-7
lines changed
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
7
7
Add the following dependency to your SBT build:
8
8
9
9
``` scala
10
- libraryDependencies += " io.udash" %%% " udash-jquery" % " 2 .0.0"
10
+ libraryDependencies += " io.udash" %%% " udash-jquery" % " 3 .0.0"
11
11
```
12
12
13
13
then import the jQuery package:
@@ -16,8 +16,10 @@ then import the jQuery package:
16
16
import io .udash .wrappers .jquery ._
17
17
```
18
18
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:
21
23
* explicit link in your ` index.html ` .
22
24
``` html
23
25
<script src =" https://code.jquery.com/jquery-3.3.1.min.js"
Original file line number Diff line number Diff line change 1
1
The ` build.sbt ` file contains two configurations:
2
- * ` jquery-demo ` uses global jQuery dependency.
2
+ * ` jquery-global- demo ` uses global jQuery dependency.
3
3
* ` jquery-bundler-demo ` uses ` ScalaJSBundlerPlugin ` in order to manage module dependencies.
4
4
5
5
### How to use?
Original file line number Diff line number Diff line change @@ -34,13 +34,15 @@ val commonSettings = Seq(
34
34
35
35
val generatedGlobalDir = file(" generated/global" )
36
36
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 )
38
39
.settings(commonSettings)
39
40
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 )
41
43
.settings(
42
44
commonSettings,
43
-
45
+
44
46
jsDependencies ++= Dependencies .jsDeps.value,
45
47
46
48
sourceDirsSettings(_.getParentFile),
You can’t perform that action at this time.
0 commit comments