Skip to content

Commit 37cef57

Browse files
removed unnecessary scripts and improved documentation
1 parent 6ab5dbf commit 37cef57

7 files changed

Lines changed: 55 additions & 39 deletions

File tree

CONTRIBUTING.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,6 @@ following information:
1212
3. Example code snippet that causes the issue.
1313
4. Screenshots of the broken UI.
1414

15-
## Development
16-
17-
Clone this repo and install [Node v16](https://nodejs.org/en/download/). Below
18-
are commands we use to perform various tasks:
19-
20-
- `npm install`, install dependencies.
21-
- `npm run compile`, run compiler.
22-
- `npm run build`, build SDK assets.
23-
- `npm run test`, run unit tests.
24-
- `npm run lint`, run linter.
25-
- `npm run format`, run code formatter.
26-
2715
## Publishing a new version
2816

2917
Publishing of the npm package is handled by github actions. The `CHANGELOG.md` and `package.json` version need to be manually updated.

DEVELOPMENT.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Local Development
2+
3+
This repository includes an example app built with Expo for local development and testing.
4+
5+
## Development Setup
6+
7+
### 1. Clone this repository
8+
9+
### 2. Install dependencies
10+
11+
```bash
12+
npm install
13+
```
14+
15+
### 3. Set up React Native
16+
17+
Follow the [React Native environment setup guide](https://reactnative.dev/docs/set-up-your-environment).
18+
19+
### 4. Install example project dependencies
20+
21+
```bash
22+
cd example
23+
npm install
24+
```
25+
26+
### 5. Configure the SSO API proxy
27+
28+
The example application uses [`@mxenabled/sso-api-proxy`][sso_api_proxy] to run a proxy server that communicates with MX's Platform API.
29+
30+
When the proxy server first starts up, it will prompt you to enter the necessary API and user settings. This configuration is then saved locally.
31+
32+
See the [configuration documentation][sso_api_proxy_config] for more information on how to configure `@mxenabled/sso-api-proxy`.
33+
34+
[sso_api_proxy]: https://www.npmjs.com/package/@mxenabled/sso-api-proxy "@mxenabled/sso-api-proxy"
35+
[sso_api_proxy_config]: https://github.com/mxenabled/sso-api-proxy#configuration "Configuration"
36+
37+
### 6. Start the development dependencies
38+
39+
This will start an SSO proxy server and watch for changes to the SDK:
40+
41+
```bash
42+
npm run dev:dependencies
43+
```
44+
45+
### 7. Run the application
46+
47+
Finally, run the application on an iOS or Android simulator:
48+
49+
```bash
50+
npm run dev
51+
```

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ Native widget. Please refer to our [React Native Widget SDK
66
documentation][sdk_docs] to get started.
77

88
[sdk_docs]: https://docs.mx.com/connect/guides/widget-sdks/react-native/ "React Native Widget SDK"
9+
10+
[Contributiong](./CONTRIBUTING.md)
11+
12+
[Development](./DEVELOPMENT.md)

bin/install-example-application-dependencies

Lines changed: 0 additions & 14 deletions
This file was deleted.

example/package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"dev:sdk": "nodemon --watch package.json --exec 'npm run compile -- --watch'",
2424
"dev:exampleServer": "mx-sso-proxy run",
2525
"documentation": "cp node_modules/@mxenabled/widget-post-message-definitions/docs/react-native-sdk-generated.md docs/widget_callback_props.md",
26-
"example:install": "bin/install-example-application-dependencies",
2726
"format": "npm run prettier -- -w",
2827
"lint": "eslint src test",
2928
"prepack": "npm run build",
@@ -64,7 +63,6 @@
6463
"react-test-renderer": "^19.0.0",
6564
"ts-node": "^10.4.0",
6665
"typescript": "^4.5.5",
67-
"uri-scheme": "^1.0.112",
6866
"vite": "^7.2.7",
6967
"vite-plugin-dts": "^4.5.4",
7068
"vitest": "^4.0.15",

0 commit comments

Comments
 (0)