Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 0 additions & 43 deletions .github/workflows/build-example-app.yml

This file was deleted.

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

### Fixed

Expand Down
12 changes: 0 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,6 @@ following information:
3. Example code snippet that causes the issue.
4. Screenshots of the broken UI.

## Development

Clone this repo and install [Node v16](https://nodejs.org/en/download/). Below
are commands we use to perform various tasks:

- `npm install`, install dependencies.
- `npm run compile`, run compiler.
- `npm run build`, build SDK assets.
- `npm run test`, run unit tests.
- `npm run lint`, run linter.
- `npm run format`, run code formatter.

## Publishing a new version

Publishing of the npm package is handled by github actions. The `CHANGELOG.md` and `package.json` version need to be manually updated.
51 changes: 51 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Local Development

This repository includes an example app built with Expo for local development and testing.

## Development Setup

### 1. Clone this repository

### 2. Install dependencies

```bash
npm install
```

### 3. Set up React Native

Follow the [React Native environment setup guide](https://reactnative.dev/docs/set-up-your-environment).

### 4. Install example project dependencies

```bash
cd example
npm install
```

### 5. Configure the SSO API proxy

The example application uses [`@mxenabled/sso-api-proxy`][sso_api_proxy] to run a proxy server that communicates with MX's Platform API.

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.

See the [configuration documentation][sso_api_proxy_config] for more information on how to configure `@mxenabled/sso-api-proxy`.

[sso_api_proxy]: https://www.npmjs.com/package/@mxenabled/sso-api-proxy "@mxenabled/sso-api-proxy"
[sso_api_proxy_config]: https://github.com/mxenabled/sso-api-proxy#configuration "Configuration"

### 6. Start the development dependencies

This will start an SSO proxy server and watch for changes to the SDK:

```bash
npm run dev:dependencies
```

### 7. Run the application

Finally, run the application on an iOS or Android simulator:

```bash
npm run dev
```
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ Native widget. Please refer to our [React Native Widget SDK
documentation][sdk_docs] to get started.

[sdk_docs]: https://docs.mx.com/connect/guides/widget-sdks/react-native/ "React Native Widget SDK"

[Contributiong](./CONTRIBUTING.md)

[Development](./DEVELOPMENT.md)
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const presets = ["module:@react-native/babel-preset"]
14 changes: 0 additions & 14 deletions bin/install-example-application-dependencies

This file was deleted.

8 changes: 0 additions & 8 deletions example/.eslintrc.js

This file was deleted.

93 changes: 36 additions & 57 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -1,64 +1,43 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
ios/.xcode.env.local
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
.cxx/

# node.js
#
# dependencies
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore
# Expo
.expo/
dist/
web-build/
expo-env.d.ts

# Native
.kotlin/
*.orig.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision

# Metro
.metro-health-check*

# debug
npm-debug.*
yarn-debug.*
yarn-error.*

# macOS
.DS_Store
*.pem

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

**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output
# typescript
*.tsbuildinfo

# Bundle artifact
*.jsbundle
app-example

# Ruby / CocoaPods
/ios/Pods/
/vendor/bundle/
# generated native folders
/ios
/android
1 change: 1 addition & 0 deletions example/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "recommendations": ["expo.vscode-expo-tools"] }
7 changes: 7 additions & 0 deletions example/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit",
"source.sortMembers": "explicit"
}
}
1 change: 0 additions & 1 deletion example/.watchmanconfig

This file was deleted.

8 changes: 0 additions & 8 deletions example/Gemfile

This file was deleted.

116 changes: 0 additions & 116 deletions example/Gemfile.lock

This file was deleted.

Loading