Skip to content

Commit ed4d34f

Browse files
authored
Merge pull request #12 from contentpass/docs-update-contributing-docs
Update contributing docs
2 parents 2684ad6 + 1b919dc commit ed4d34f

File tree

2 files changed

+38
-18
lines changed

2 files changed

+38
-18
lines changed

CONTRIBUTING.md

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ This project is a monorepo managed using [Yarn workspaces](https://yarnpkg.com/f
1010

1111
- The library package in the root directory.
1212
- 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.
1315

1416
To get started with the project, run `yarn` in the root directory to install the required dependencies for each package:
1517

@@ -19,13 +21,19 @@ yarn
1921

2022
> Since the project relies on Yarn workspaces, you cannot use [`npm`](https://github.com/npm/cli) for development.
2123
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.
2325

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.
2528

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`.
2735

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`.
2937

3038
You can use various commands from the root directory to work with the project.
3139

@@ -35,23 +43,42 @@ To start the packager:
3543
yarn example start
3644
```
3745

46+
OR
47+
48+
```sh
49+
yarn expo-example start
50+
```
51+
3852
To run the example app on Android:
3953

4054
```sh
4155
yarn example android
4256
```
4357

58+
OR
59+
60+
```sh
61+
yarn expo-example android
62+
```
63+
4464
To run the example app on iOS:
4565

4666
```sh
4767
yarn example ios
4868
```
4969

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:
5177

5278
```sh
5379
yarn typecheck
5480
yarn lint
81+
yarn prettier:check
5582
```
5683

5784
To fix formatting errors, run the following:
@@ -97,18 +124,6 @@ To publish new versions, run the following:
97124
yarn release
98125
```
99126

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-
112127
### Sending a pull request
113128

114129
> **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).
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import type { ContentpassConfig } from 'react-native-contentpass';
22

33
export const contentpassConfig: ContentpassConfig = {
4+
// Testing app
45
propertyId: 'cc3fc4ad-cbe5-4d09-bf85-a49796603b19',
5-
redirectUrl: 'de.contentpass.demo://oauth',
66
issuer: 'https://my.contentpass.dev',
7+
// Staging app
8+
// propertyId: '78da2fd3-8b25-4642-b7b7-4a0193d00f89',
9+
// issuer: 'https://my.contentpass.io',
10+
11+
redirectUrl: 'de.contentpass.demo://oauth',
712
};

0 commit comments

Comments
 (0)