Skip to content

Commit b18c0bf

Browse files
committed
feat(build): ensure JSX is transformed and update template
Using the JSX react-native configuration in tsconfig no longer transforms to createElement calls. release-npm
1 parent 6c8c4bd commit b18c0bf

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Starting point for creating React Native plugins in TypeScript without native co
1414
> :warning: **node**: Requires at least node version 16.
1515
1616
```
17-
npm init -y react-native-plugin react-native-my-plugin
17+
npm init -y react-native-plugin@latest react-native-my-plugin
1818
# or
19-
npx create-react-native-plugin react-native-my-plugin
19+
npx create-react-native-plugin@latest react-native-my-plugin
2020
```
2121

2222
This will bootstrap a new plugin inside a folder named `react-native-my-plugin` accordingly. Inside that folder the commands mentioned hereafter are available. The prefix `react-native-` is optional and will be removed where the React Native context is implied.
@@ -76,6 +76,8 @@ The following plugins have been created with create-react-native-plugin as a sta
7676
Scroll indicator for views with overflow.
7777
- [Naxos](https://github.com/tobua/naxos)
7878
UI Library.
79+
- [Responsive React Native](https://github.com/tobua/responsive-react-native)
80+
Automatically transforms StyleSheet values responsively.
7981

8082
<p align="center">
8183
<img src="https://github.com/tobua/create-react-native-plugin/raw/main/app.png" alt="Plugin running in Preview App" width="250">

template/package.json

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,27 @@
2323
},
2424
"peerDependencies": {
2525
"react": "^18.2.0",
26-
"react-native": "^0.69.1"
26+
"react-native": "^0.69.4"
2727
},
2828
"devDependencies": {
29-
"@babel/core": "^7.18.6",
30-
"@babel/runtime": "^7.18.6",
31-
"@react-native-community/eslint-config": "3.0.3",
32-
"@types/jest": "^28.1.4",
33-
"@types/react": "^18.0.15",
34-
"@types/react-native": "^0.69.2",
29+
"@react-native-community/eslint-config": "3.1.0",
30+
"@types/jest": "^28.1.8",
31+
"@types/react": "^18.0.17",
32+
"@types/react-native": "^0.69.5",
3533
"@types/react-test-renderer": "^18.0.0",
36-
"@typescript-eslint/eslint-plugin": "^5.30.5",
37-
"@typescript-eslint/parser": "^5.30.5",
38-
"babel-jest": "^28.1.2",
34+
"@typescript-eslint/eslint-plugin": "^5.34.0",
35+
"@typescript-eslint/parser": "^5.34.0",
36+
"babel-jest": "^28.1.3",
3937
"cpx": "^1.5.0",
40-
"esbuild": "^0.14.48",
41-
"eslint": "^8.19.0",
38+
"esbuild": "^0.15.5",
39+
"eslint": "^8.22.0",
4240
"eslint-plugin-flowtype": "^8.0.3",
43-
"jest": "^28.1.2",
44-
"metro-react-native-babel-preset": "^0.71.3",
41+
"jest": "^28.1.3",
42+
"metro-react-native-babel-preset": "^0.72.1",
4543
"npm-run-all": "^4.1.5",
4644
"prettier": "^2.7.1",
4745
"react": "^18.2.0",
48-
"react-native": "^0.69.1",
46+
"react-native": "^0.69.4",
4947
"react-test-renderer": "^18.2.0",
5048
"typescript": "^4.7.4"
5149
},

template/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"module": "commonjs",
55
"lib": ["es2017"],
66
"allowJs": true,
7-
"jsx": "react-native",
7+
"jsx": "react",
88
"isolatedModules": true,
99
"strict": true,
1010
"moduleResolution": "node",

0 commit comments

Comments
 (0)