-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b6d8f5
commit 4bde6ca
Showing
48 changed files
with
13,834 additions
and
1,171 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,15 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
|
||
indent_style = space | ||
indent_size = 2 | ||
|
||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = 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 @@ | ||
lib |
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,3 @@ | ||
*.pbxproj -text | ||
# specific for windows script files | ||
*.bat text eol=crlf |
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 |
---|---|---|
@@ -1,7 +1,3 @@ | ||
module.exports = function(api) { | ||
api.cache(true); | ||
return { | ||
presets: ['babel-preset-expo'], | ||
plugins: ['react-native-reanimated/plugin'] | ||
}; | ||
module.exports = { | ||
presets: ["module:metro-react-native-babel-preset"], | ||
}; |
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": "redrip-example", | ||
"displayName": "BobMonorepo Example", | ||
"expo": { | ||
"name": "redrip-example", | ||
"slug": "redrip-example", | ||
"description": "Example app for redrip", | ||
"privacy": "public", | ||
"version": "1.0.0", | ||
"platforms": [ | ||
"ios", | ||
"android", | ||
"web" | ||
], | ||
"ios": { | ||
"supportsTablet": true | ||
}, | ||
"assetBundlePatterns": [ | ||
"**/*" | ||
], | ||
"experiments": { | ||
"turboModules": 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,7 @@ | ||
module.exports = function(api) { | ||
api.cache(true); | ||
return { | ||
presets: ['babel-preset-expo'], | ||
plugins: ['react-native-reanimated/plugin'] | ||
}; | ||
}; |
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,8 @@ | ||
import { registerRootComponent } from "expo"; | ||
|
||
import App from "./src/App"; | ||
|
||
// 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); |
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,92 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
|
||
const escape = require("escape-string-regexp"); | ||
const fs = require("fs"); | ||
const blacklist = require("metro-config/src/defaults/blacklist"); | ||
const path = require("path"); | ||
|
||
const root = path.resolve(__dirname, ".."); | ||
const packages = path.resolve(root, "packages"); | ||
|
||
// List all packages under `packages/` | ||
const workspaces = fs | ||
.readdirSync(packages) | ||
.map((p) => path.join(packages, p)) | ||
.filter( | ||
(p) => | ||
fs.statSync(p).isDirectory() && | ||
fs.existsSync(path.join(p, "package.json")) | ||
); | ||
|
||
// Get the list of dependencies for all packages in the monorepo | ||
const modules = ["@expo/vector-icons"] | ||
.concat( | ||
...workspaces.map((it) => { | ||
const pak = JSON.parse( | ||
fs.readFileSync(path.join(it, "package.json"), "utf8") | ||
); | ||
|
||
// We need to make sure that only one version is loaded for peerDependencies | ||
// So we blacklist them at the root, and alias them to the versions in example's node_modules | ||
return pak.peerDependencies ? Object.keys(pak.peerDependencies) : []; | ||
}) | ||
) | ||
.sort() | ||
.filter( | ||
(m, i, self) => | ||
// Remove duplicates and package names of the packages in the monorepo | ||
self.lastIndexOf(m) === i && !m.startsWith("@redrip/") | ||
); | ||
|
||
module.exports = { | ||
projectRoot: __dirname, | ||
|
||
// We need to watch the root of the monorepo | ||
// This lets Metro find the monorepo packages automatically using haste | ||
// This also lets us import modules from monorepo root | ||
watchFolders: [root], | ||
|
||
resolver: { | ||
// We need to blacklist the peerDependencies we've collected in packages' node_modules | ||
blacklistRE: blacklist( | ||
[].concat( | ||
...workspaces.map((it) => | ||
modules.map( | ||
(m) => | ||
new RegExp(`^${escape(path.join(it, "node_modules", m))}\\/.*$`) | ||
) | ||
) | ||
) | ||
), | ||
|
||
// When we import a package from the monorepo, metro won't be able to find their deps | ||
// We need to specify them in `extraNodeModules` to tell metro where to find them | ||
extraNodeModules: modules.reduce((acc, name) => { | ||
acc[name] = path.join(root, "node_modules", name); | ||
return acc; | ||
}, {}), | ||
}, | ||
|
||
server: { | ||
enhanceMiddleware: (middleware) => { | ||
return (req, res, next) => { | ||
// When an asset is imported outside the project root, it has wrong path on Android | ||
// So we fix the path to correct one | ||
if (/\/packages\/.+\.png\?.+$/.test(req.url)) { | ||
req.url = `/assets/../${req.url}`; | ||
} | ||
|
||
return middleware(req, res, next); | ||
}; | ||
}, | ||
}, | ||
|
||
transformer: { | ||
getTransformOptions: () => ({ | ||
transform: { | ||
experimentalImportSupport: false, | ||
inlineRequires: 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,40 @@ | ||
{ | ||
"name": "redrip-example", | ||
"description": "Example app for redrip", | ||
"version": "0.0.1", | ||
"private": true, | ||
"main": "index", | ||
"scripts": { | ||
"android": "expo start --android", | ||
"ios": "expo start --ios", | ||
"web": "expo start --web", | ||
"start": "expo start", | ||
"test": "jest" | ||
}, | ||
"dependencies": { | ||
"@react-spring/native": "^9.0.0-rc.3", | ||
"expo": "^40.0.0-beta.5", | ||
"expo-splash-screen": "~0.8.1", | ||
"expo-status-bar": "~1.0.3", | ||
"framer-motion": "^3.2.1", | ||
"lodash.set": "^4.3.2", | ||
"react": "~16.13.1", | ||
"react-dom": "^16.13.1", | ||
"react-native": "0.63.4", | ||
"react-native-gesture-handler": "~1.8.0", | ||
"react-native-reanimated": "2.0.0-rc.0", | ||
"react-native-unimodules": "~0.12.0", | ||
"react-native-web": "~0.14.9", | ||
"react-navigation-stack": "^2.8.4", | ||
"react-spring": "^8.0.27" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "~7.12.10", | ||
"@babel/runtime": "^7.9.6", | ||
"@types/lodash.set": "^4.3.6", | ||
"babel-loader": "^8.2.2", | ||
"babel-plugin-module-resolver": "^4.0.0", | ||
"babel-preset-expo": "8.3.0", | ||
"expo-cli": "^4.0.13" | ||
} | ||
} |
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.
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,54 @@ | ||
// import { AnimatePresence } from 'framer-motion' | ||
import React, { useReducer, useState } from 'react' | ||
import { StyleSheet, Pressable } from 'react-native' | ||
// import * as Redrip from 'redrip' | ||
|
||
// const { View } = Redrip | ||
|
||
// function Shape() { | ||
// return ( | ||
// <View | ||
// from={{ | ||
// opacity: 0, | ||
// scale: 0.9, | ||
// }} | ||
// animate={{ | ||
// opacity: 1, | ||
// scale: 1, | ||
// }} | ||
// exit={{ | ||
// opacity: 0, | ||
// scale: 0.9, | ||
// }} | ||
// style={styles.shape} | ||
// /> | ||
// ) | ||
// } | ||
|
||
export default function Presence() { | ||
const [visible, toggle] = useReducer((s) => !s, true) | ||
|
||
return ( | ||
<Pressable onPress={toggle} style={styles.container}> | ||
{/* <AnimatePresence>{visible && <Shape />}</AnimatePresence> */} | ||
</Pressable> | ||
) | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
shape: { | ||
justifyContent: 'center', | ||
height: 250, | ||
width: 250, | ||
borderRadius: 25, | ||
marginRight: 10, | ||
backgroundColor: 'white', | ||
}, | ||
container: { | ||
flex: 1, | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
flexDirection: 'row', | ||
backgroundColor: '#9c1aff', | ||
}, | ||
}) |
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.