Skip to content

Commit

Permalink
Merge pull request #30 from mauriciord/feature/expo-app
Browse files Browse the repository at this point in the history
Expo App package with TS
  • Loading branch information
jgcmarins authored Apr 6, 2020
2 parents c70d4e6 + 91458b4 commit c53e549
Show file tree
Hide file tree
Showing 11 changed files with 6,392 additions and 762 deletions.
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,22 @@ __generated__
# editor
.vscode
.editorconfig
.idea

# test
reports

# typescript composite build info
tsconfig.tsbuildinfo
.now
.now

# Expos
.expo/
npm-debug.*
*.jks
*.p8
*.p12
*.key
*.mobileprovision
*.orig.*
web-build/
16 changes: 5 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,14 @@
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"**/react-native",
"**/react-native/**"
]
},
"scripts": {
"app:android": "yarn workspace @golden-stack/app android",
"app:clear": "yarn workspace @golden-stack/app clear",
"app:ios": "yarn workspace @golden-stack/app ios",
"app:jetify": "yarn workspace @golden-stack/app jetify",
"app:pod": "yarn workspace @golden-stack/app pod:install",
"app:redirect-ports": "yarn workspace @golden-stack/app redirect-ports",
"app:android": "yarn workspace @golden-stack/app expo android",
"app:ios": "yarn workspace @golden-stack/app expo ios",
"app:relay": "yarn workspace @golden-stack/app relay",
"app:shake": "yarn workspace @golden-stack/app shake",
"app:start": "yarn workspace @golden-stack/app start",
"app:web": "yarn workspace @golden-stack/app expo start -w",
"build:server": "yarn workspace @golden-stack/server build",
"build:web": "yarn workspace @golden-stack/web build",
"dev": "concurrently -n web,graphql --kill-others \"yarn web\" \"yarn graphql\"",
Expand Down Expand Up @@ -69,12 +61,14 @@
"@typescript-eslint/eslint-plugin": "^2.18.0",
"@typescript-eslint/parser": "^2.18.0",
"concurrently": "^5.0.0",
"expo-yarn-workspaces": "^1.2.1",
"husky": "^4.2.1",
"jest": "^25.1.0",
"jest-cli": "25.1.0",
"jest-junit": "^10.0.0",
"lerna": "^3.20.2",
"lint-staged": "^10.0.3",
"metro-config": "^0.58.0",
"prettier": "^1.19.1",
"sort-package-json": "1.22.1",
"typescript": "^3.7.5"
Expand Down
19 changes: 19 additions & 0 deletions packages/expo-app/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';

export default function App() {
return (
<View style={styles.container}>
<Text>Golden Stack with TS</Text>
</View>
);
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
33 changes: 33 additions & 0 deletions packages/expo-app/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"expo": {
"name": "Blank Template",
"slug": "expo-app",
"privacy": "public",
"sdkVersion": "36.0.0",
"packagerOpts": {
"config": "metro.config.js"
},
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
}
}
}
Binary file added packages/expo-app/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 packages/expo-app/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 packages/expo-app/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: ['babel-preset-expo'],
};
};
3 changes: 3 additions & 0 deletions packages/expo-app/metro.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const { createMetroConfiguration } = require('expo-yarn-workspaces');

module.exports = createMetroConfiguration(__dirname);
27 changes: 27 additions & 0 deletions packages/expo-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "@golden-stack/app",
"version": "0.0.1",
"private": true,
"main": "__generated__/AppEntry.js",
"scripts": {
"android": "expo start --android",
"postinstall": "expo-yarn-workspaces postinstall",
"ios": "expo start --ios",
"start": "expo start",
"web": "expo start --web"
},
"dependencies": {
"expo": "^36.0.2",
"expo-asset": "~8.0.0",
"expo-keep-awake": "^8.0.0",
"react": "~16.9.0",
"react-dom": "~16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz",
"react-native-web": "~0.11.7"
},
"devDependencies": {
"@babel/core": "^7.0.0",
"babel-preset-expo": "~8.0.0",
"expo-cli": "^3.16.1"
}
}
46 changes: 46 additions & 0 deletions packages/expo-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
"importHelpers": true,
"jsx": "react-native",
"lib": ["dom", "esnext"],
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"noEmit": true,
"noEmitHelpers": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"skipLibCheck": true,
"strict": true,
"target": "esnext",
"allowJs": true,
"baseUrl": ".",
// autocomplete paths
"paths": {
"*": ["src/*", "assets/*"],
"components/*": ["src/components/*"],
"constants/*": ["src/constants/*"],
"features/*": ["src/features/*"],
"navigation/*": ["src/navigation/*"],
"screens/*": ["src/screens/*"],
"services/*": ["src/services/*"],
"shared/*": ["src/shared/*"],
"state/*": ["src/state/*"],
"utils/*": ["src/utils/*"],
"assets/*": ["assets/*"]
},
"removeComments": true,
"typeRoots": ["node_modules/@types", "./src/@types"]
},
"include": ["src"],
"exclude": [
"node_modules",
"./node_modules",
"./node_modules/*"
]
}
Loading

0 comments on commit c53e549

Please sign in to comment.