Skip to content

Commit 9b1457a

Browse files
Merge pull request #115 from mxenabled/wes/expo
Wes/expo
2 parents c13a325 + 8df4b53 commit 9b1457a

File tree

94 files changed

+16026
-23243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+16026
-23243
lines changed

.github/workflows/build-example-app.yml

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

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2222
- Example app is now using the built files instead of pointing directly at src
2323
- react-native-webview is now a peer dependency
2424
- reduced the number of commands required to develop locally
25+
- Using expo for the example app
26+
- Converted from vitest to jest to fix compatibility issues
2527

2628
### Fixed
2729

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)

babel.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const presets = ["module:@react-native/babel-preset"]

bin/install-example-application-dependencies

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

example/.eslintrc.js

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

example/.gitignore

Lines changed: 36 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,43 @@
1-
# OSX
2-
#
3-
.DS_Store
4-
5-
# Xcode
6-
#
7-
build/
8-
*.pbxuser
9-
!default.pbxuser
10-
*.mode1v3
11-
!default.mode1v3
12-
*.mode2v3
13-
!default.mode2v3
14-
*.perspectivev3
15-
!default.perspectivev3
16-
xcuserdata
17-
*.xccheckout
18-
*.moved-aside
19-
DerivedData
20-
*.hmap
21-
*.ipa
22-
*.xcuserstate
23-
ios/.xcode.env.local
1+
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
242

25-
# Android/IntelliJ
26-
#
27-
build/
28-
.idea
29-
.gradle
30-
local.properties
31-
*.iml
32-
*.hprof
33-
.cxx/
34-
35-
# node.js
36-
#
3+
# dependencies
374
node_modules/
38-
npm-debug.log
39-
yarn-error.log
405

41-
# BUCK
42-
buck-out/
43-
\.buckd/
44-
*.keystore
45-
!debug.keystore
6+
# Expo
7+
.expo/
8+
dist/
9+
web-build/
10+
expo-env.d.ts
11+
12+
# Native
13+
.kotlin/
14+
*.orig.*
15+
*.jks
16+
*.p8
17+
*.p12
18+
*.key
19+
*.mobileprovision
20+
21+
# Metro
22+
.metro-health-check*
23+
24+
# debug
25+
npm-debug.*
26+
yarn-debug.*
27+
yarn-error.*
28+
29+
# macOS
30+
.DS_Store
31+
*.pem
4632

47-
# fastlane
48-
#
49-
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
50-
# screenshots whenever they are needed.
51-
# For more information about the recommended setup visit:
52-
# https://docs.fastlane.tools/best-practices/source-control/
33+
# local env files
34+
.env*.local
5335

54-
**/fastlane/report.xml
55-
**/fastlane/Preview.html
56-
**/fastlane/screenshots
57-
**/fastlane/test_output
36+
# typescript
37+
*.tsbuildinfo
5838

59-
# Bundle artifact
60-
*.jsbundle
39+
app-example
6140

62-
# Ruby / CocoaPods
63-
/ios/Pods/
64-
/vendor/bundle/
41+
# generated native folders
42+
/ios
43+
/android

example/.vscode/extensions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "recommendations": ["expo.vscode-expo-tools"] }

0 commit comments

Comments
 (0)