Skip to content

Commit

Permalink
fix: #8 use tsup & limit dependencies version
Browse files Browse the repository at this point in the history
  • Loading branch information
liulirui committed May 17, 2023
1 parent e980eb6 commit 78aa2aa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ LICENSE
node_modules/
.idea/
package-lock.json
lib/
dist/
.DS_Store
28 changes: 6 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@
"name": "react-native-reanimated-viewer",
"version": "1.1.1",
"description": "A high performance image viewer in react-native used by react-native-reanimated",
"main": "lib/commonjs/index.js",
"module": "lib/module/index.js",
"react-native": "src/index.ts",
"types": "lib/typescript/index.d.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"lib/",
"src/"
"dist/**"
],
"scripts": {
"build": "bob build"
"build": "tsup src/index.ts --dts --clean"
},
"repository": {
"type": "git",
Expand All @@ -33,7 +30,7 @@
},
"homepage": "https://github.com/BooYeu/react-native-reanimated-viewer#readme",
"dependencies": {
"react-hooks-extension": "*"
"react-hooks-extension": ">=1.0.0"
},
"devDependencies": {
"@types/react": "^18.0.27",
Expand All @@ -49,26 +46,13 @@
"react-native-builder-bob": "^0.20.4",
"react-native-gesture-handler": ">=2",
"react-native-reanimated": ">=2",
"tsup": "^6.5.0",
"typescript": "^5.0.4"
},
"peerDependencies": {
"react": ">=16.8.0",
"react-native": ">=0.62",
"react-native-gesture-handler": ">=2",
"react-native-reanimated": ">=2"
},
"react-native-builder-bob": {
"source": "src",
"output": "lib",
"targets": [
"commonjs",
"module",
[
"typescript",
{
"project": "tsconfig.json"
}
]
]
}
}
2 changes: 1 addition & 1 deletion src/components/imageViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ const ImageViewer = forwardRef<ImageViewerRef, ImageViewerProps>((props, ref) =>
) {
imageX.value = withTiming(0);
imageY.value = withTiming(0);
showOriginalImage();
runOnJS(showOriginalImage)();
} else {
onClose();
}
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true
},
"exclude": ["example"],
"include": ["src", "lib"]
"exclude": ["node_modules", "dist", "example"],
"include": ["src"]
}

0 comments on commit 78aa2aa

Please sign in to comment.