Skip to content

Commit

Permalink
Merge pull request #3 from cmaycumber/monorepo-conversion
Browse files Browse the repository at this point in the history
Monorepo conversion
  • Loading branch information
nandorojo authored Jan 31, 2021
2 parents 2b6d8f5 + 3a38c3b commit 3d95280
Show file tree
Hide file tree
Showing 49 changed files with 13,665 additions and 1,101 deletions.
15 changes: 15 additions & 0 deletions .editorconfig
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
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib
3 changes: 3 additions & 0 deletions .gitattributes
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
42 changes: 22 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
#
.DS_Store

# XDE
.expo/

# VSCode
.vscode/
jsconfig.json

# Xcode
#
build/
Expand All @@ -22,42 +29,37 @@ DerivedData
*.xcuserstate
project.xcworkspace

# Android/IntelliJ
# Android/IJ
#
build/
.idea
.gradle
local.properties
*.iml
android.iml

# Cocoapods
#
example/ios/Pods

# node.js
#
node_modules/
npm-debug.log
yarn-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore
android/app/libs
android/keystores/debug.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
# Expo
.expo/*

# Bundle artifacts
*.jsbundle
# generated by bob
lib/

# CocoaPods
/ios/Pods/

# Expo
.expo/*
web-build/
**/web-build
**/.expo
15 changes: 0 additions & 15 deletions App.tsx

This file was deleted.

Empty file removed Web.tsx
Empty file.
7 changes: 0 additions & 7 deletions app.json

This file was deleted.

8 changes: 2 additions & 6 deletions babel.config.js
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"],
};
1 change: 1 addition & 0 deletions example/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './src/Drip.Presence'
13 changes: 13 additions & 0 deletions example/__generated__/AppEntry.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions example/app.json
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
}
}
}
7 changes: 7 additions & 0 deletions example/babel.config.js
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']
};
};
8 changes: 8 additions & 0 deletions example/index.js
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);
4 changes: 4 additions & 0 deletions example/metro.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const { createMetroConfiguration } = require('expo-yarn-workspaces')

module.exports = createMetroConfiguration(__dirname)
42 changes: 42 additions & 0 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "redrip-example",
"description": "Example app for redrip",
"version": "0.0.1",
"private": true,
"main": "__generated__/AppEntry.js",
"scripts": {
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"start": "expo start",
"test": "jest",
"postinstall": "expo-yarn-workspaces postinstall"
},
"dependencies": {
"redrip": "*",
"@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"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Drip.Color.tsx → example/src/Drip.Color.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useReducer, useState } from 'react'
import { Button, StyleSheet } from 'react-native'
import { View } from './src/components'
import { View } from 'redrip'

function AnimatedCircle() {
const colors = ['#41b87a', '#533592']
Expand Down
2 changes: 1 addition & 1 deletion Drip.Presence.tsx → example/src/Drip.Presence.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AnimatePresence } from 'framer-motion'
import React, { useReducer, useState } from 'react'
import { StyleSheet, Pressable } from 'react-native'
import * as Redrip from './src/components'
import * as Redrip from 'redrip'

const { View } = Redrip

Expand Down
2 changes: 1 addition & 1 deletion Drip.Repeat.tsx → example/src/Drip.Repeat.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { StyleSheet } from 'react-native'
import * as Redrip from './src/components'
import * as Redrip from 'redrip'

const { View } = Redrip

Expand Down
5 changes: 2 additions & 3 deletions Drip.tsx → example/src/Drip.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { View as NativeView, Button, Text, StyleSheet } from 'react-native'
import React from 'react'
import * as Drip from './src/components'
import useAnimationState from './src/redripify/use-animator'
import * as Drip from 'redrip';

export default function AnimatedStyleUpdateExample() {
const box = useAnimationState({
const box = Drip.useAnimationState({
from: {
width: 100,
height: 100,
Expand Down
File renamed without changes.
File renamed without changes.
30 changes: 1 addition & 29 deletions Ideas.tsx → example/src/Ideas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ import Animated, {
// import processColor from 'react-native-reanimated/src/reanimated2/Colors'
import { View, Button } from 'react-native'
import React, { useRef, useContext } from 'react'
import { colorKeys } from './src/constants/color-keys'
import { TransitionConfig } from './src/redripify/types'
import { colorKeys } from 'redrip'

type Animation = typeof withSpring | typeof withDecay | typeof withTiming

Expand Down Expand Up @@ -295,33 +294,6 @@ function AnimatedStyleUpdateExample(props) {
borderRadius: withTiming(4, config),
}

if (expanded.value) {
return Object.assign(
{ backgroundColor: 'red' },
animateStyles(
{
width: 100,
height: 100,
borderRadius: 50,
},
withTiming,
config
)
)
}

return Object.assign(
{ backgroundColor: 'red' },
animateStyles(
{
width: 30,
height: 30,
borderRadius: 8,
},
withTiming,
config
)
)
})

return (
Expand Down
2 changes: 1 addition & 1 deletion Measure.tsx → example/src/Measure.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { ComponentProps, useReducer, useState } from 'react'
import * as Drip from './src'
import * as Drip from 'redrip'
import { Button, View } from 'react-native'

function useLayout() {
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions example/src/Web.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default 'web'
20 changes: 20 additions & 0 deletions example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"redrip": ["../packages/redrip/src"]
},
"jsx": "react-native",
"target": "esnext",
"lib": [
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"noEmit": true,
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"moduleResolution": "node"
}
}
Loading

0 comments on commit 3d95280

Please sign in to comment.