-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(example): 🔨 move example and dependencies out of main package
- Loading branch information
1 parent
a010060
commit 2d87705
Showing
48 changed files
with
8,623 additions
and
3,973 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
example/* |
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,21 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true, | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
// extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], | ||
rules: { | ||
'member-access': 0, | ||
'interface-name': 0, | ||
'ordered-imports': 0, | ||
'object-literal-sort-keys': 0, | ||
'variable-name': 0, | ||
'one-variable-per-declaration': 0, | ||
'no-empty': 0, | ||
'no-console': 0, | ||
'no-shadowed-variable': 0, | ||
'no-extra-boolean-cast': 0, | ||
}, | ||
} |
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 |
---|---|---|
|
@@ -26,3 +26,4 @@ flow-typedefs/ | |
yarn-error.log | ||
web-build/ | ||
types.d.ts | ||
example |
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 |
---|---|---|
@@ -1,6 +1,10 @@ | ||
module.exports = function (api) { | ||
api.cache(true) | ||
return { | ||
presets: ['babel-preset-expo', '@babel/preset-typescript'], | ||
presets: ['module:metro-react-native-babel-preset'], | ||
plugins: [ | ||
'@babel/plugin-transform-flow-strip-types', | ||
'@babel/plugin-proposal-unicode-property-regex', | ||
], | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,4 @@ | ||
{ | ||
"12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true, | ||
"40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true | ||
} |
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,14 @@ | ||
node_modules/ | ||
.expo/ | ||
dist/ | ||
npm-debug.* | ||
*.jks | ||
*.p8 | ||
*.p12 | ||
*.key | ||
*.mobileprovision | ||
*.orig.* | ||
web-build/ | ||
|
||
# macOS | ||
.DS_Store |
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
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,32 @@ | ||
{ | ||
"expo": { | ||
"name": "example", | ||
"slug": "example", | ||
"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 | ||
}, | ||
"android": { | ||
"adaptiveIcon": { | ||
"foregroundImage": "./assets/adaptive-icon.png", | ||
"backgroundColor": "#FFFFFF" | ||
} | ||
}, | ||
"web": { | ||
"favicon": "./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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,16 @@ | ||
module.exports = function (api) { | ||
api.cache(true) | ||
return { | ||
presets: ['babel-preset-expo'], | ||
plugins: [ | ||
[ | ||
'module-resolver', | ||
{ | ||
alias: { | ||
'react-native-gifted-chat': '../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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import React from 'react' | ||
import { Text, Platform, View } from 'react-native' | ||
import { SafeAreaView } from 'react-native-safe-area-context' | ||
|
||
export function NavBar() { | ||
if (Platform.OS === 'web') { | ||
return null | ||
} | ||
return ( | ||
<SafeAreaView | ||
style={{ | ||
backgroundColor: '#f5f5f5', | ||
alignItems: 'center', | ||
}} | ||
> | ||
<Text>💬 Gifted Chat{'\n'}</Text> | ||
</SafeAreaView> | ||
) | ||
} |
File renamed without changes.
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
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,26 @@ | ||
const { getDefaultConfig } = require('@expo/metro-config') | ||
const path = require('path') | ||
|
||
const defaultConfig = getDefaultConfig(__dirname) | ||
|
||
defaultConfig.watchFolders = [ | ||
...defaultConfig.watchFolders, | ||
path.resolve(__dirname, '../src'), | ||
] | ||
|
||
defaultConfig.resolver.extraNodeModules = new Proxy( | ||
{}, | ||
{ | ||
get: (target, name) => { | ||
if (target.hasOwnProperty(name)) { | ||
return target[name] | ||
} | ||
if (name === 'react-native-gifted-chat') { | ||
return path.join(process.cwd(), `../src`) | ||
} | ||
return path.join(process.cwd(), `node_modules/${name}`) | ||
}, | ||
}, | ||
) | ||
|
||
module.exports = defaultConfig |
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,43 @@ | ||
{ | ||
"name": "example", | ||
"version": "1.0.0", | ||
"main": "node_modules/expo/AppEntry.js", | ||
"scripts": { | ||
"start": "expo start", | ||
"android": "expo start --android", | ||
"ios": "expo start --ios", | ||
"web": "expo start --web", | ||
"eject": "expo eject" | ||
}, | ||
"dependencies": { | ||
"expo": "~44.0.0", | ||
"expo-app-loading": "~1.3.0", | ||
"expo-image-picker": "~12.0.1", | ||
"expo-linking": "3.0.0", | ||
"expo-location": "~14.0.1", | ||
"expo-permissions": "~13.1.0", | ||
"expo-status-bar": "~1.2.0", | ||
"react": "17.0.1", | ||
"react-dom": "17.0.1", | ||
"react-native": "0.64.3", | ||
"react-native-communications": "2.2.1", | ||
"react-native-lightbox": "0.8.1", | ||
"react-native-maps": "0.29.4", | ||
"react-native-parsed-text": "0.0.22", | ||
"react-native-safe-area-context": "3.3.2", | ||
"react-native-screens": "~3.10.1", | ||
"react-native-typing-animation": "0.1.7", | ||
"react-native-web": "0.17.1", | ||
"use-memo-one": "^1.1.2" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.12.9", | ||
"@expo/react-native-action-sheet": "3.13.0", | ||
"@react-navigation/native": "6.0.10", | ||
"@types/react": "~17.0.21", | ||
"@types/react-native": "~0.64.12", | ||
"babel-plugin-module-resolver": "4.1.0", | ||
"typescript": "~4.3.5" | ||
}, | ||
"private": true | ||
} |
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 @@ | ||
{ | ||
"extends": "expo/tsconfig.base", | ||
"compilerOptions": { | ||
"strict": true | ||
} | ||
} |
Oops, something went wrong.