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
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+32-17Lines changed: 32 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@ This project is a monorepo managed using [Yarn workspaces](https://yarnpkg.com/f
10
10
11
11
- The library package in the root directory.
12
12
- An example app in the `example/` directory.
13
+
- An expo example app in the `expoExample/` directory.
14
+
- A shared frontend code for example apps in the `sharedExample/` directory.
13
15
14
16
To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:
15
17
@@ -19,13 +21,19 @@ yarn
19
21
20
22
> Since the project relies on Yarn workspaces, you cannot use [`npm`](https://github.com/npm/cli) for development.
21
23
22
-
The [example app](/example/) demonstrates usage of the library. You need to run it to test any changes you make.
24
+
The [example app](/example/)and [expo example app](/expoExample/)demonstrates usage of the library. You need to run it to test any changes you make.
23
25
24
-
It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example app. Changes to the library's JavaScript code will be reflected in the example app without a rebuild, but native code changes will require a rebuild of the example app.
26
+
It is configured to use the local version of the library, so any changes you make to the library's source code will be reflected in the example apps.
27
+
Changes to the library's JavaScript code will be reflected in the example apps without a rebuild, but native code changes will require a rebuild of the example app.
25
28
26
-
If you want to use Android Studio or XCode to edit the native code, you can open the `example/android` or `example/ios` directories respectively in those editors. To edit the Objective-C or Swift files, open `example/ios/ContentpassExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-contentpass`.
29
+
If you want to use Android Studio or XCode to edit the native code, you can open the
30
+
-`example/android`
31
+
-`example/ios`
32
+
-`expoExample/android`
33
+
-`expoExample/ios`
34
+
directories respectively in those editors. To edit the Objective-C or Swift files, open `ios/ContentpassExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-contentpass`.
27
35
28
-
To edit the Java or Kotlin files, open `example/android` in Android studio and find the source files at `react-native-contentpass` under `Android`.
36
+
To edit the Java or Kotlin files, open `android` in Android studio and find the source files at `react-native-contentpass` under `Android`.
29
37
30
38
You can use various commands from the root directory to work with the project.
31
39
@@ -35,23 +43,42 @@ To start the packager:
35
43
yarn example start
36
44
```
37
45
46
+
OR
47
+
48
+
```sh
49
+
yarn expo-example start
50
+
```
51
+
38
52
To run the example app on Android:
39
53
40
54
```sh
41
55
yarn example android
42
56
```
43
57
58
+
OR
59
+
60
+
```sh
61
+
yarn expo-example android
62
+
```
63
+
44
64
To run the example app on iOS:
45
65
46
66
```sh
47
67
yarn example ios
48
68
```
49
69
50
-
Make sure your code passes TypeScript and ESLint. Run the following to verify:
70
+
OR
71
+
72
+
```sh
73
+
yarn expo-example ios
74
+
```
75
+
76
+
Make sure your code passes TypeScript, ESLint and Prettier. Run the following to verify:
51
77
52
78
```sh
53
79
yarn typecheck
54
80
yarn lint
81
+
yarn prettier:check
55
82
```
56
83
57
84
To fix formatting errors, run the following:
@@ -97,18 +124,6 @@ To publish new versions, run the following:
97
124
yarn release
98
125
```
99
126
100
-
### Scripts
101
-
102
-
The `package.json` file contains various scripts for common tasks:
103
-
104
-
-`yarn`: setup project by installing dependencies.
105
-
-`yarn typecheck`: type-check files with TypeScript.
106
-
-`yarn lint`: lint files with ESLint.
107
-
-`yarn test`: run unit tests with Jest.
108
-
-`yarn example start`: start the Metro server for the example app.
109
-
-`yarn example android`: run the example app on Android.
110
-
-`yarn example ios`: run the example app on iOS.
111
-
112
127
### Sending a pull request
113
128
114
129
> **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github).
0 commit comments