Skip to content

Commit 36c3055

Browse files
committed
fixed broken detection on android mainactivity. Probably worth moving to regex.
1 parent e727b9a commit 36c3055

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ Config plugin to auto configure react-native-keyevent on prebuild
44
### Add the package to your npm dependencies
55

66
```
7-
yarn add react-native-keyevent react-native-keyevent-expo-config-plugin
7+
yarn add react-native-keyevent
8+
yarn add --dev react-native-keyevent-expo-config-plugin
89
```
910

1011
In your `app.json` or equivalent, add the following;
1112
```js
1213
{
1314
expo: {
1415
/* ... */
15-
plugins: ['./plugins/withReactNativeKeyEvent'],
16+
plugins: ['react-native-keyevent-expo-config-plugin'],
1617
},
1718
}
1819
```

build/withReactNativeKeyevent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const withAndroidMainActivityImport = (config) => {
8484
tag: 'react-native-keyevent-import',
8585
src: config.modResults.contents,
8686
newSrc: newSrc.join('\n'),
87-
anchor: `package com.morrow.flint;`,
87+
anchor: `;`,
8888
offset: 1,
8989
comment: '//',
9090
});

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-keyevent-expo-config-plugin",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Config plugin to auto configure react-native-keyevent on prebuild",
55
"main": "build/withReactNativeKeyevent.js",
66
"types": "build/withReactNativeKeyevent.d.ts",

src/withReactNativeKeyevent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const withAndroidMainActivityImport: ConfigPlugin = (config) => {
8484
tag: 'react-native-keyevent-import',
8585
src: config.modResults.contents,
8686
newSrc: newSrc.join('\n'),
87-
anchor: `package com.morrow.flint;`,
87+
anchor: `;`,
8888
offset: 1,
8989
comment: '//',
9090
});

0 commit comments

Comments
 (0)