Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kilbot committed Sep 21, 2022
0 parents commit c710c5d
Show file tree
Hide file tree
Showing 14 changed files with 217 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .expo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
> Why do I have a folder named ".expo" in my project?
The ".expo" folder is created when an Expo project is started using "expo start" command.
> What do the files contain?
- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
- "settings.json": contains the server configuration that is used to serve the application manifest.
> Should I commit the ".expo" folder?
No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.
Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
8 changes: 8 additions & 0 deletions .expo/devices.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"devices": [
{
"installationId": "3E383B1A-DC11-45CD-BE7D-4B5B536B91EC",
"lastUsed": 1661619119710
}
]
}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
See https://blog.expo.dev/developing-react-native-with-expo-and-flipper-8c426bdf995a

```
eas build --profile=devclient
```
46 changes: 46 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"expo": {
"name": "wcpos-monorepo-app-with-flipper",
"slug": "wcpos-monorepo-app-with-flipper",
"owner": "kilbot",
"version": "1.0.0",
"jsEngine": "hermes",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"bundleIdentifier": "com.wcpos.client.flipper",
"buildNumber": "1.0.0",
"supportsTablet": true
},
"android": {
"package": "com.wcpos.client.flipper",
"versionCode": 400010000,
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
}
},
"web": {
"favicon": "./assets/favicon.png"
},
"plugins": [
"expo-community-flipper"
],
"extra": {
"eas": {
"projectId": "2a051d9c-1c4c-40e2-98c2-f87ee7b6e485"
}
}
}
}
Binary file added 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 assets/favicon.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 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 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 babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = function (api) {
api.cache(true);
return {
presets: ['@wcpos/babel-preset-expo'],
};
};
30 changes: 30 additions & 0 deletions eas.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"build": {
"base": {
"env": {}
},
"preview": {
"extends": "base",
"releaseChannel": "default",
"distribution": "internal",
"android": {
"buildType": "apk"
}
},
"devclient": {
"extends": "base",
"releaseChannel": "default",
"distribution": "internal",
"developmentClient": true,
"android": {
"buildType": "apk"
},
"ios": {
"simulator": true
}
}
},
"cli": {
"version": ">= 0.39.0"
}
}
16 changes: 16 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { registerRootComponent } from 'expo';
import { connectToDevTools } from 'react-devtools-core';

import App from '@wcpos/core';

if (__DEV__) {
connectToDevTools({
host: 'localhost',
port: 8097,
});
}

// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
// It also ensures that whether you load the app in the Expo client or in a native build,
// the environment is set up appropriately
registerRootComponent(App);
26 changes: 26 additions & 0 deletions metro.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Learn more https://docs.expo.io/guides/customizing-metro

// Add support for svg files: https://github.com/react-native-svg/react-native-svg#use-with-svg-files

const { getDefaultConfig } = require('expo/metro-config');
const path = require('path');

const projectRoot = __dirname;
const workspaceRoot = path.resolve(__dirname, '../..');

module.exports = (async () => {
const config = await getDefaultConfig(__dirname);

const {
resolver: { sourceExts, assetExts },
} = config;

config.watchFolders = [workspaceRoot];
config.resolver.disableHierarchicalLookup = true;
config.resolver.nodeModulesPaths = [
path.resolve(projectRoot, 'node_modules'),
path.resolve(workspaceRoot, 'node_modules'),
];

return config;
})();
59 changes: 59 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"private": true,
"name": "@wcpos/app-with-flipper",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"build": "echo 'Nothing to build'",
"test": "eslint --ext js,ts,tsx .",
"start": "expo start --dev-client",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"eas-build-post-install": "echo 'Post install build?'"
},
"dependencies": {
"@shopify/flash-list": "^1.2.2",
"@wcpos/core": "*",
"base-64": "1.0.0",
"expo": "^46.0.10",
"expo-application": "~4.2.2",
"expo-community-flipper": "46.0.1",
"expo-constants": "~13.2.4",
"expo-dev-client": "~1.2.1",
"expo-device": "~4.3.0",
"expo-haptics": "~11.3.0",
"expo-sqlite": "~10.3.0",
"expo-status-bar": "~1.4.0",
"expo-system-ui": "~1.3.0",
"expo-updates": "~0.14.5",
"react": "18.2.0",
"react-devtools-core": "4.26.0",
"react-dom": "18.2.0",
"react-native": "0.69.5",
"react-native-flipper": "0.164.0",
"react-native-gesture-handler": "~2.6.1",
"react-native-get-random-values": "~1.8.0",
"react-native-pager-view": "5.4.25",
"react-native-reanimated": "2.6.0",
"react-native-screens": "~3.17.0",
"react-native-svg": "12.3.0",
"react-native-web": "~0.18.9"
},
"devDependencies": {
"@babel/core": "^7.19.1",
"@expo/webpack-config": "^0.17.2",
"@types/react": "^18.0.20",
"@types/react-dom": "~18.0.6",
"@types/react-native": "~0.70.2",
"@wcpos/babel-preset-expo": "*",
"@wcpos/eslint-config": "*",
"@wcpos/tsconfig": "*",
"react-native-svg-transformer": "1.0.0",
"typescript": "^4.8.3"
},
"eslintConfig": {
"extends": "@wcpos/eslint-config"
}
}
13 changes: 13 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "@wcpos/tsconfig/base.json",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"jsx": "react-native",
"lib": ["dom", "esnext"],
"moduleResolution": "node",
"noEmit": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"strict": true
}
}

0 comments on commit c710c5d

Please sign in to comment.