You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tool to create a React Native library module, optionally as an extremely simple view component, with a single command (based on [`react-native-create-library`](https://www.npmjs.com/package/react-native-create-library))
3
+
Tool to create a React Native library module or native view component, with a single command.
See below for command-line usage, example with no view, and example with an extremely simple native view.
8
6
9
-
TODO: QUICK USAGE SECTION HERE
7
+
This tool based on [`react-native-create-library`](https://www.npmjs.com/package/react-native-create-library), with working example callbacks, optional native view, and some other updates added by [@brodybits (Christoper J. Brody aka Chris Brody)](https://github.com/brodybits).
8
+
9
+
<!-- FUTURE TODO: QUICK USAGE SECTION HERE -->
10
+
11
+
**LICENSE:** MIT
10
12
11
13
### Why might you need this?
12
14
@@ -23,6 +25,18 @@ Why not use `react-native new-library`? Unfortunately that command doesn't creat
23
25
## Installation
24
26
25
27
Requirements: Node 6.0+
28
+
29
+
Packages required to be installed globally if the recommended example app is generated:
The module would be generated in the `react-native-alice-helper` subdirectory, and the example test app would be in `react-native-alice-helper/example`. (Note that this tool will show an incorrect project name when it is finished.)
130
+
131
+
Then go into the example app subdirectory:
132
+
133
+
```
134
+
cd react-native-alice-helper/example
135
+
```
136
+
137
+
#### Running the example app
138
+
139
+
__Within the example test app subdirectory:__
140
+
141
+
It is *recommended* to start the Metro Bundler manually (within `react-native-alice-helper/example`), which would run in the foreground:
142
+
143
+
```
144
+
npm start
145
+
```
146
+
147
+
Otherwise, React Native will open its own window to run the Metro Bundler.
148
+
149
+
To run on Android, do the following command (within `react-native-alice-helper/example`):
150
+
151
+
```
152
+
react-native run-android
153
+
```
154
+
155
+
This assumes that the `ANDROID_HOME` environmental variable is set properly. Here is a sample command that does not make such an assumption on a mac:
The module would be generated in the `react-native-alice-helper` subdirectory, and the example test app would be in `react-native-alice-helper/example`. (Note that this tool will show an incorrect project name when it is finished.)
189
+
190
+
Then go into the example app subdirectory:
191
+
192
+
```
193
+
cd react-native-carol-widget/example
194
+
```
195
+
196
+
__Within the example test app subdirectory:__
197
+
198
+
It is *recommended* to start the Metro Bundler manually as described above (within `react-native-carol-widget/example`):
199
+
200
+
```
201
+
npm start
202
+
```
203
+
204
+
To run on Android, do `react-native run-android` as described for the other example above.
205
+
206
+
To run on iOS, do `react-native run-ios` or `open ios/example.xcodeproj` as described for the other example above.
207
+
208
+
__Expected result:__
209
+
210
+
- on Android: a check box that is checked (and cannot be changed)
211
+
- on iOS: a label with 5 red asterisks
212
+
104
213
## Acknowledgements
105
214
106
215
-[`react-native-create-library`](https://www.npmjs.com/package/react-native-create-library) - original basis of this project
107
216
-[`react-native-share`](https://www.npmjs.com/package/react-native-share) - was acknowledged as "a great source of inspiration" for [`react-native-create-library`](https://www.npmjs.com/package/react-native-create-library)
0 commit comments