Skip to content

Commit 1a87882

Browse files
authored
migrate to reanimated v2 (#36)
* migrate to reanimated v2 * add custom animation config * add beta * update build step * add hooks * fix pointerEvents * update example README * update package.json * remove console log Co-authored-by: computerjazz <[email protected]>
1 parent e36960b commit 1a87882

File tree

7 files changed

+3012
-2247
lines changed

7 files changed

+3012
-2247
lines changed

README.md

Lines changed: 153 additions & 116 deletions
Large diffs are not rendered by default.

babel.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
presets: ["module:metro-react-native-babel-preset"],
3+
plugins: ["react-native-reanimated/plugin"],
4+
};

package.json

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
22
"name": "react-native-swipeable-item",
3-
"version": "1.5.7",
3+
"version": "2.0.0",
44
"description": "A horizontally swipeable flatlist row compatible with react-native-draggable-flatlist",
5-
"main": "lib/index.js",
6-
"types": "lib/index.d.ts",
5+
"main": "lib/commonjs/index",
6+
"module": "lib/module/index",
7+
"react-native": "src/index.tsx",
8+
"types": "lib/typescript/index.d.ts",
79
"scripts": {
810
"test": "echo \"Error: no test specified\" && exit 1",
9-
"build": "tsc"
11+
"typecheck": "tsc --skipLibCheck --noEmit",
12+
"build": "bob build"
1013
},
1114
"husky": {
1215
"hooks": {
@@ -23,9 +26,7 @@
2326
"native",
2427
"gesture",
2528
"swipe",
26-
"to",
27-
"delete",
28-
"swipe"
29+
"delete"
2930
],
3031
"author": "Daniel Merrill",
3132
"license": "MIT",
@@ -34,20 +35,30 @@
3435
},
3536
"homepage": "https://github.com/computerjazz/react-native-swipeable-item#readme",
3637
"peerDependencies": {
37-
"react-native": "^0.59.0",
38-
"react-native-gesture-handler": "^1.0.0",
39-
"react-native-reanimated": "^1.0.0"
38+
"react-native": ">=0.62.0",
39+
"react-native-gesture-handler": ">=1.10.1",
40+
"react-native-reanimated": ">=2.0.0"
4041
},
4142
"devDependencies": {
42-
"@types/react": "^16.8.8",
43-
"@types/react-native": "^0.60.8",
43+
"@types/react": "^17.0.5",
44+
"@types/react-native": "^0.64.5",
4445
"husky": "^4.2.0",
45-
"prettier": "1.19.1",
46+
"prettier": "^2.2.1",
4647
"pretty-quick": "^2.0.1",
47-
"react": "^16.12.0",
48-
"react-native": "^0.61.5",
49-
"react-native-gesture-handler": "^1.5.3",
50-
"react-native-reanimated": "^1.13.0",
51-
"typescript": "^3.7.3"
48+
"react": "~16.9.0",
49+
"react-native": "^0.62.2",
50+
"react-native-builder-bob": "^0.18.1",
51+
"react-native-gesture-handler": "^1.10.3",
52+
"react-native-reanimated": "^2.2.0",
53+
"typescript": "^4.2.4"
54+
},
55+
"react-native-builder-bob": {
56+
"source": "src",
57+
"output": "lib",
58+
"targets": [
59+
"commonjs",
60+
"module",
61+
"typescript"
62+
]
5263
}
5364
}

0 commit comments

Comments
 (0)