Skip to content

Commit f99c74a

Browse files
committed
docs(readme): add logo & README troubleshooting, formatting improvements
1 parent ecf6800 commit f99c74a

File tree

2 files changed

+22
-23
lines changed

2 files changed

+22
-23
lines changed

README.md

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# create-react-native-plugin
22

3+
<img align="right" src="https://github.com/tobua/create-react-native-plugin/raw/master/logo.png" width="20%" alt="Create React Native Plugin" />
4+
35
Starting point for creating React Native plugins without native code.
46

7+
- Setup demo app with plugin
8+
- Watch plugin source for changes
9+
510
## Usage
611

712
```
@@ -10,61 +15,55 @@ npm init react-native-plugin react-native-my-plugin
1015
npx create-react-native-plugin react-native-my-plugin
1116
```
1217

13-
This will bootstrap a new plugin inside a folder named `my-plugin` accordingly. Inside that folder the commands
14-
mentioned hereafter are available.
18+
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.
1519

16-
Start working on your plugin by editing `/src/index.js` which will be the entry point for the plugin.
20+
Start working on your plugin by editing `src/index.js` which will be the entry point for the plugin.
1721

1822
## App
1923

20-
Since you probably don't want to blind-code the whole plugin use the following command to generate an up-to-date
21-
React Native app which includes the plugin:
24+
Since you probably don't want to blind-code the whole plugin use the following command to generate an up-to-date React Native app which includes the plugin:
2225

2326
```
2427
npm run app
2528
```
2629

27-
This will create an app inside `/app` where except `/app/App.js` all files are gitignored. Here you can try out various
28-
use cases of the plugin and use this as a way to demonstrate the plugin.
30+
This will create an app inside `/app` where except `/app/App.js` all files are gitignored. Here you can try out various use cases of the plugin and use this as a way to demonstrate the plugin.
2931

3032
```
3133
npm run watch
3234
```
3335

34-
Running the above will watch the plugin `/src/` folder for any kind of changes and copy them over to the app which will
35-
then automatically hot-reload.
36+
Running the above will watch the plugin `/src/` folder for any kind of changes and copy them over to the app which will then automatically hot-reload.
3637

37-
Don't forget to always check your plugin both on Android and iOS even though your not using native code the provided components
38-
might still differ depending on the platform.
38+
Don't forget to always check your plugin both on Android and iOS even though your not using native code the provided components might still differ depending on the platform.
3939

4040
## Tests
4141

42-
The template is configured to work with Jest out of the box. All non-native functionality can be tested from the terminal.
43-
With the following command you can run the tests which are found in a folder with the same name:
42+
The template is configured to work with Jest out of the box. All non-native functionality can be tested from the terminal. With the following command you can run the tests which are found in a folder with the same name:
4443

4544
```
4645
npm test
4746
```
4847

4948
## Types
5049

51-
Since React Native will usually run in a modern JavaScript engine there is no need to transpile your source code and
52-
apps can directly use the plugin source code. The Flow type checker is the default type system for react native and the
53-
source code is writting in flow. While TypeScript is the more popular type checker overall flow is more popular in the
54-
React Native ecosystem and can be used out of the box. Therefore this package will only support flow.
50+
Since React Native will usually run in a modern JavaScript engine there is no need to transpile your source code and apps can directly use the plugin source code. The Flow type checker is the default type system for react native and the source code is writting in flow. While TypeScript is the more popular type checker overall flow is more popular in the React Native ecosystem and can be used out of the box. Therefore this package will only support flow.
51+
52+
## Troubleshooting
5553

56-
## Naming
54+
If you have issues building the app for iOS try the following
5755

58-
React Native plugins are usually distributed through npm just as any other kind of browser and node plugins. To better distinguish
59-
the plugin from a browser or node plugin the prefix `react-native-whatever-plugin` is usually added.
56+
- Update XCode in the App Store (installation takes time)
57+
- Update Cocoapods with `sudo gem install cocoapods`
58+
- Update Pod dependencies in `app/ios` folder with `pod update`
6059

6160
## Examples
6261

6362
The following plugins have been created with create-react-native-plugin as a starting point.
6463

6564
- [React Native Indicate](https://github.com/naminho/indicate/tree/master/plugins/react-native)
66-
Scroll indicator for views with overflow.
65+
Scroll indicator for views with overflow.
6766
- [Reactigation](https://github.com/naminho/reactigation)
68-
JS-only navigation for React Native.
67+
JS-only navigation for React Native.
6968
- [React Native Cols](https://github.com/naminho/react-native-cols)
70-
Grid for React Native.
69+
Grid for React Native.

logo.png

33.7 KB
Loading

0 commit comments

Comments
 (0)