-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(js): include React Native Expo example app
Signed-off-by: berendsliedrecht <blu3beri@proton.me>
- Loading branch information
berendsliedrecht
authored and
Berend Sliedrecht
committed
May 14, 2024
1 parent
1636421
commit c522cb2
Showing
13 changed files
with
8,235 additions
and
8,046 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
wrappers/javascript/packages/aries-askar-react-native-example/app.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"expo": { | ||
"name": "aries-askar-react-native-example", | ||
"slug": "aries-askar-react-native-example", | ||
"version": "1.0.0", | ||
"orientation": "portrait", | ||
"icon": "./assets/icon.png", | ||
"userInterfaceStyle": "light", | ||
"splash": { | ||
"image": "./assets/splash.png", | ||
"resizeMode": "contain", | ||
"backgroundColor": "#ffffff" | ||
}, | ||
"assetBundlePatterns": ["**/*"], | ||
"ios": { | ||
"supportsTablet": true, | ||
"bundleIdentifier": "org.hyperledger.aries_askar.example" | ||
}, | ||
"android": { | ||
"adaptiveIcon": { | ||
"foregroundImage": "./assets/adaptive-icon.png", | ||
"backgroundColor": "#ffffff" | ||
}, | ||
"package": "org.hyperledger.aries_askar.example" | ||
} | ||
} | ||
} |
Binary file added
BIN
+17.1 KB
...s/javascript/packages/aries-askar-react-native-example/assets/adaptive-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+21.9 KB
wrappers/javascript/packages/aries-askar-react-native-example/assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+46.2 KB
wrappers/javascript/packages/aries-askar-react-native-example/assets/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions
6
wrappers/javascript/packages/aries-askar-react-native-example/babel.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = function (api) { | ||
api.cache(true) | ||
return { | ||
presets: ['babel-preset-expo'], | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
wrappers/javascript/packages/aries-askar-react-native-example/metro.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const { getDefaultConfig } = require('expo/metro-config') | ||
const path = require('path') | ||
|
||
const projectRoot = __dirname | ||
const workspaceRoot = path.resolve(projectRoot, '../..') | ||
|
||
const config = getDefaultConfig(projectRoot) | ||
|
||
config.watchFolders = [workspaceRoot] | ||
|
||
config.resolver.nodeModulesPaths = [ | ||
path.resolve(projectRoot, 'node_modules'), | ||
path.resolve(workspaceRoot, 'node_modules'), | ||
] | ||
|
||
config.resolver.disableHierarchicalLookup = true | ||
|
||
module.exports = config |
25 changes: 25 additions & 0 deletions
25
wrappers/javascript/packages/aries-askar-react-native-example/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "aries-askar-react-native-example", | ||
"version": "1.0.0", | ||
"private": true, | ||
"main": "./src/index.js", | ||
"scripts": { | ||
"start": "expo start", | ||
"android": "expo run:android", | ||
"ios": "expo run:ios", | ||
"prebuild": "expo prebuild" | ||
}, | ||
"dependencies": { | ||
"@hyperledger/aries-askar-react-native": "workspace:*", | ||
"expo": "~51.0.2", | ||
"expo-status-bar": "~1.12.1", | ||
"react": "18.2.0", | ||
"react-native": "0.74.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.20.0", | ||
"@babel/runtime": "^7.22.15", | ||
"@types/react": "~18.2.45", | ||
"typescript": "~5.4.5" | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
wrappers/javascript/packages/aries-askar-react-native-example/src/App.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ariesAskar } from '@hyperledger/aries-askar-react-native' | ||
import { StyleSheet, Text, View } from 'react-native' | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
backgroundColor: '#fff', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}, | ||
}) | ||
|
||
export const App = () => ( | ||
<View style={styles.container}> | ||
<Text>{ariesAskar.version()}</Text> | ||
</View> | ||
) |
5 changes: 5 additions & 0 deletions
5
wrappers/javascript/packages/aries-askar-react-native-example/src/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { registerRootComponent } from 'expo' | ||
|
||
import { App } from './App' | ||
|
||
registerRootComponent(App) |
10 changes: 10 additions & 0 deletions
10
wrappers/javascript/packages/aries-askar-react-native-example/tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"noEmit": true, | ||
"skipLibCheck": true, | ||
"types": ["react-native"], | ||
"jsx": "react-native" | ||
}, | ||
"include": ["src"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.