Skip to content

Commit 488be25

Browse files
committed
refactor: Converts to TypeScript.
BREAKING CHANGE: The enums are now exported as named exports rather than attached to FastImage. FastImage is now a named export instead of a default export.
1 parent e24c931 commit 488be25

File tree

7 files changed

+1639
-376
lines changed

7 files changed

+1639
-376
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ example/android/app/src/main/gen
3838

3939
# build
4040
react-native-fast-image-*.tgz
41+
dist/
4142

4243
# coverage reports
4344
coverage

package.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,23 @@
1919
},
2020
"license": "(MIT AND Apache-2.0)",
2121
"author": "Dylan Vann <[email protected]> (https://dylanvann.com)",
22-
"main": "src/index.js",
23-
"types": "src/index.d.ts",
22+
"main": "dist/index.js",
23+
"module": "dist/react-native-fast-image.esm.js",
24+
"typings": "dist/index.d.ts",
2425
"files": [
2526
"android",
2627
"!android/build",
2728
"ios",
2829
"!ios/build",
29-
"src",
30+
"dist",
3031
"RNFastImage.podspec"
3132
],
3233
"scripts": {
33-
"build": "exit 0",
34+
"build": "tsdx build",
3435
"commit": "git-cz",
3536
"format": "yarn prettier --write",
36-
"lint": "eslint src/**/*.js",
37-
"prettier": "prettier './**/*.{js,d.ts,js.flow,yml}'",
37+
"lint": "eslint 'src/**/*.tsx'",
38+
"prettier": "prettier './src/**/*.{tsx,js.flow,yml}'",
3839
"semantic-release": "semantic-release",
3940
"test": "jest ./src/*.js"
4041
},
@@ -59,6 +60,8 @@
5960
"@semantic-release/git": "^9.0.0",
6061
"@semantic-release/npm": "^7.0.3",
6162
"@semantic-release/release-notes-generator": "^9.0.1",
63+
"@types/react": "^16.9.23",
64+
"@types/react-native": "^0.61.17",
6265
"babel-jest": "^24.9.0",
6366
"commitizen": "^4.0.3",
6467
"cz-conventional-changelog": "^3.1.0",
@@ -75,6 +78,7 @@
7578
"react-native": "0.61.5",
7679
"react-test-renderer": "16.9.0",
7780
"semantic-release": "^17.0.4",
81+
"tsdx": "^0.12.3",
7882
"typescript": "^3.8.3"
7983
},
8084
"peerDependencies": {

src/index.d.ts

Lines changed: 0 additions & 154 deletions
This file was deleted.

src/index.js

Lines changed: 0 additions & 122 deletions
This file was deleted.

0 commit comments

Comments
 (0)