Skip to content

Commit d739b50

Browse files
authored
Upgrade to rescript and rescript/react (#21)
1 parent a89ae3c commit d739b50

30 files changed

+673
-784
lines changed

bs-react-spring/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# bs-react-spring
22

3-
Reason bindings for [react-spring](http://react-spring.surge.sh). Works with ReasonReact 0.7.0 and above.
3+
Rescript bindings for [react-spring](http://react-spring.surge.sh). Works with @rescript/react 0.7.0 and above.
44

55
## Todo
66

bs-react-spring/__tests__/AppSpec.re

-5
This file was deleted.

bs-react-spring/__tests__/AppSpec.res

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
open Jest
2+
3+
test("addition", _ => {
4+
open Expect
5+
expect(3 + 4) |> toBe(7)
6+
})

bs-react-spring/bsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"in-source": true
1919
}
2020
],
21-
"bs-dependencies": ["reason-react"],
21+
"bs-dependencies": ["@rescript/react"],
2222
"bs-dev-dependencies": ["@glennsl/bs-jest"],
2323
"refmt": 3
2424
}

bs-react-spring/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"react-with-gesture": "^4.0.8"
77
},
88
"scripts": {
9-
"start": "bsb -clean-world -make-world -w",
10-
"build": "bsb -clean-world -make-world"
9+
"start": "rescript build -with-deps -w",
10+
"build": "rescript clean && rescript build -with-deps"
1111
},
1212
"devDependencies": {
13-
"bs-platform": "^7.2.2",
14-
"reason-react": "^0.7.0"
13+
"@rescript/react": "^0.10.3",
14+
"rescript": "^9.1.4"
1515
}
1616
}

bs-react-spring/src/Gesture.re renamed to bs-react-spring/src/Gesture.res

+7-8
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type props = {
1010
/* source event */
1111
event: ReactEvent.Mouse.t,
1212
/* dom node */
13-
target: Js.t({.}),
13+
target: {.},
1414
/* time tag */
1515
time: float,
1616
/* click coordinates (vec2) */
@@ -35,12 +35,11 @@ type props = {
3535
/* marks first event (mouse / touch down) */
3636
first: bool,
3737
/* arguments optionally passed to bind(a,b,c,d,..) */
38-
args: Js.t({.}),
38+
args: {.},
3939
/* arguments optionally returned by onActions eventHandler */
40-
temp: Js.t({.}),
41-
};
42-
[@bs.module "react-with-gesture"]
43-
external _externalUseGesture: (. props => 'a) => 'a => Spring.Div.spreadProps =
44-
"useGesture";
40+
temp: {.},
41+
}
42+
@module("react-with-gesture")
43+
external _externalUseGesture: (. props => 'a, 'a) => Spring.Div.spreadProps = "useGesture"
4544

46-
let useGesture = _externalUseGesture;
45+
let useGesture = _externalUseGesture

bs-react-spring/src/Spring.re

-315
This file was deleted.

0 commit comments

Comments
 (0)