Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

Commit

Permalink
feat: initial version of native stack (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
osdnk authored and satya164 committed Oct 10, 2019
1 parent 42beb66 commit ba3f718
Show file tree
Hide file tree
Showing 36 changed files with 771 additions and 112 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@react-navigation/routers",
"@react-navigation/compat",
"@react-navigation/stack",
"@react-navigation/native-stack",
"@react-navigation/drawer",
"@react-navigation/bottom-tabs",
"@react-navigation/material-top-tabs",
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
.expo
.gradle

local.properties

/coverage/
/types/
/dist/
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"typescript": "^3.6.3"
},
"resolutions": {
"react": "16.8.3",
"react-native": "0.59.10"
"react": "~16.8.3",
"react-native": "~0.59.10"
},
"husky": {
"hooks": {
Expand Down
4 changes: 2 additions & 2 deletions packages/bottom-tabs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"@types/react": "^16.9.4",
"@types/react-native": "^0.60.17",
"del-cli": "^3.0.0",
"react": "16.8.3",
"react-native": "0.59.10",
"react": "~16.8.3",
"react-native": "~0.59.10",
"react-native-safe-area-context": "^0.3.6",
"typescript": "^3.6.3"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
},
"devDependencies": {
"@types/react": "^16.9.4",
"react": "^16.8.3",
"react": "~16.8.3",
"typescript": "^3.6.3"
},
"peerDependencies": {
"@react-navigation/core": "^5.0.0-alpha.0",
"react": "^16.8.3"
"react": "~16.8.3"
},
"@react-native-community/bob": {
"source": "src",
Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
"@types/react": "^16.9.4",
"@types/shortid": "^0.0.29",
"del-cli": "^3.0.0",
"react": "^16.8.3",
"react": "~16.8.3",
"react-native-testing-library": "^1.9.1",
"react-test-renderer": "16.8.3",
"react-test-renderer": "~16.8.3",
"typescript": "^3.6.3"
},
"peerDependencies": {
"react": "^16.8.3"
"react": "~16.8.3"
},
"@react-native-community/bob": {
"source": "src",
Expand Down
8 changes: 4 additions & 4 deletions packages/drawer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
"@types/react": "^16.9.4",
"@types/react-native": "^0.60.17",
"del-cli": "^3.0.0",
"react": "16.8.3",
"react-native": "0.59.10",
"react": "~16.8.3",
"react-native": "~0.59.10",
"react-native-gesture-handler": "^1.3.0",
"react-native-reanimated": "^1.3.0",
"react-native-safe-area-context": "^0.3.6",
"react-native-screens": "^1.0.0-alpha.22",
"react-native-screens": "^2.0.0-alpha.3",
"typescript": "^3.6.3"
},
"peerDependencies": {
Expand All @@ -56,7 +56,7 @@
"react-native-gesture-handler": "^1.0.0",
"react-native-reanimated": "^1.0.0",
"react-native-safe-area-context": "^0.3.6",
"react-native-screens": "^1.0.0-alpha.0"
"react-native-screens": "^1.0.0-alpha.0 || ^2.0.0-alpha.3"
},
"@react-native-community/bob": {
"source": "src",
Expand Down
1 change: 1 addition & 0 deletions packages/example/android/app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
<orderEntry type="library" name="Gradle: com.facebook.soloader:soloader:0.6.0@aar" level="project" />
<orderEntry type="library" name="Gradle: io.nlopez.smartlocation:library:3.2.11@aar" level="project" />
<orderEntry type="library" name="Gradle: com.facebook.fresco:fbcore:1.10.0@aar" level="project" />
<orderEntry type="module" module-name="react-native-screens" />
<orderEntry type="module" module-name="react-native-reanimated" />
<orderEntry type="module" module-name="react-native-gesture-handler" />
<orderEntry type="module" module-name="expo-permissions" />
Expand Down
2 changes: 2 additions & 0 deletions packages/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ android {
}

dependencies {
implementation project(':react-native-safe-area-context')
implementation project(':react-native-screens')
implementation project(':react-native-reanimated')
implementation project(':react-native-gesture-handler')
implementation fileTree(dir: "libs", include: ["*.jar"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import android.app.Application;

import com.facebook.react.ReactApplication;
import com.th3rdwave.safeareacontext.SafeAreaContextPackage;
import com.swmansion.rnscreens.RNScreensPackage;
import com.swmansion.reanimated.ReanimatedPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
Expand Down Expand Up @@ -39,6 +41,8 @@ public boolean getUseDeveloperSupport() {
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new SafeAreaContextPackage(),
new RNScreensPackage(),
new ReanimatedPackage(),
new RNGestureHandlerPackage(),
new ModuleRegistryAdapter(mModuleRegistryProvider)
Expand Down
3 changes: 3 additions & 0 deletions packages/example/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

android.useAndroidX=true
android.enableJetifier=true
8 changes: 0 additions & 8 deletions packages/example/android/local.properties

This file was deleted.

4 changes: 4 additions & 0 deletions packages/example/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
apply from: '../node_modules/react-native-unimodules/gradle.groovy'
include ':react-native-safe-area-context'
project(':react-native-safe-area-context').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-safe-area-context/android')
include ':react-native-screens'
project(':react-native-screens').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-screens/android')
include ':react-native-reanimated'
project(':react-native-reanimated').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-reanimated/android')
includeUnimodulesProjects()
Expand Down
3 changes: 3 additions & 0 deletions packages/example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ target 'ReactNavigationExample' do
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'RNGestureHandler', :podspec => '../node_modules/react-native-gesture-handler/RNGestureHandler.podspec'
pod 'RNReanimated', :podspec => '../node_modules/react-native-reanimated/RNReanimated.podspec'
pod 'RNScreens', :podspec => '../node_modules/react-native-screens/RNScreens.podspec'

use_unimodules!
pod 'react-native-safe-area-context', :path => '../node_modules/react-native-safe-area-context'

end
106 changes: 59 additions & 47 deletions packages/example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
PODS:
- boost-for-react-native (1.63.0)
- DoubleConversion (1.1.6)
- EXAppLoaderProvider (6.0.0)
- EXConstants (6.0.0):
- EXAppLoaderProvider (7.0.0)
- EXConstants (7.0.0):
- UMConstantsInterface
- UMCore
- EXFileSystem (6.0.2):
- EXFileSystem (7.0.0):
- UMCore
- UMFileSystemInterface
- EXFont (6.0.1):
- EXFont (7.0.0):
- UMCore
- UMFontInterface
- EXKeepAwake (6.0.0):
- EXKeepAwake (7.0.0):
- UMCore
- EXLinearGradient (6.0.0):
- EXLinearGradient (7.0.0):
- UMCore
- EXLocation (6.0.0):
- EXLocation (7.0.0):
- UMCore
- UMPermissionsInterface
- UMTaskManagerInterface
- EXPermissions (6.0.0):
- EXPermissions (7.0.0):
- UMCore
- UMPermissionsInterface
- EXSQLite (6.0.0):
- EXSQLite (7.0.0):
- UMCore
- UMFileSystemInterface
- EXWebBrowser (6.0.0):
- EXWebBrowser (7.0.1):
- UMCore
- Folly (2018.10.22.00):
- boost-for-react-native
Expand All @@ -34,6 +34,8 @@ PODS:
- glog (0.3.5)
- React (0.59.10):
- React/Core (= 0.59.10)
- react-native-safe-area-context (0.3.6):
- React
- React/Core (0.59.10):
- yoga (= 0.59.10.React)
- React/CxxBridge (0.59.10):
Expand Down Expand Up @@ -91,21 +93,23 @@ PODS:
- React
- RNReanimated (1.1.0):
- React
- UMBarCodeScannerInterface (3.0.0)
- UMCameraInterface (3.0.0)
- UMConstantsInterface (3.0.0)
- UMCore (3.0.2)
- UMFaceDetectorInterface (3.0.0)
- UMFileSystemInterface (3.0.0)
- UMFontInterface (3.0.0)
- UMImageLoaderInterface (3.0.0)
- UMPermissionsInterface (3.0.0)
- UMReactNativeAdapter (3.0.0):
- RNScreens (2.0.0-alpha.3):
- React
- UMBarCodeScannerInterface (4.0.0)
- UMCameraInterface (4.0.0)
- UMConstantsInterface (4.0.0)
- UMCore (4.0.0)
- UMFaceDetectorInterface (4.0.0)
- UMFileSystemInterface (4.0.0)
- UMFontInterface (4.0.0)
- UMImageLoaderInterface (4.0.0)
- UMPermissionsInterface (4.0.0)
- UMReactNativeAdapter (5.0.0-alpha.0):
- React
- UMCore
- UMFontInterface
- UMSensorsInterface (3.0.0)
- UMTaskManagerInterface (3.0.0)
- UMSensorsInterface (4.0.0)
- UMTaskManagerInterface (4.0.0)
- yoga (0.59.10.React)

DEPENDENCIES:
Expand All @@ -122,6 +126,7 @@ DEPENDENCIES:
- EXWebBrowser (from `../node_modules/expo-web-browser/ios`)
- Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- React/Core (from `../node_modules/react-native`)
- React/CxxBridge (from `../node_modules/react-native`)
- React/DevSupport (from `../node_modules/react-native`)
Expand All @@ -138,6 +143,7 @@ DEPENDENCIES:
- React/RCTWebSocket (from `../node_modules/react-native`)
- RNGestureHandler (from `../node_modules/react-native-gesture-handler/RNGestureHandler.podspec`)
- RNReanimated (from `../node_modules/react-native-reanimated/RNReanimated.podspec`)
- RNScreens (from `../node_modules/react-native-screens/RNScreens.podspec`)
- UMBarCodeScannerInterface (from `../node_modules/unimodules-barcode-scanner-interface/ios`)
- UMCameraInterface (from `../node_modules/unimodules-camera-interface/ios`)
- UMConstantsInterface (from `../node_modules/unimodules-constants-interface/ios`)
Expand All @@ -147,7 +153,7 @@ DEPENDENCIES:
- UMFontInterface (from `../node_modules/unimodules-font-interface/ios`)
- UMImageLoaderInterface (from `../node_modules/unimodules-image-loader-interface/ios`)
- UMPermissionsInterface (from `../node_modules/unimodules-permissions-interface/ios`)
- "UMReactNativeAdapter (from `../node_modules/@unimodules/react-native-adapter/ios`)"
- "UMReactNativeAdapter (from `../node_modules/react-native-unimodules/node_modules/@unimodules/react-native-adapter/ios`)"
- UMSensorsInterface (from `../node_modules/unimodules-sensors-interface/ios`)
- UMTaskManagerInterface (from `../node_modules/unimodules-task-manager-interface/ios`)
- yoga (from `../node_modules/react-native/ReactCommon/yoga`)
Expand Down Expand Up @@ -195,10 +201,14 @@ EXTERNAL SOURCES:
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
React:
:path: "../node_modules/react-native"
react-native-safe-area-context:
:path: "../node_modules/react-native-safe-area-context"
RNGestureHandler:
:podspec: "../node_modules/react-native-gesture-handler/RNGestureHandler.podspec"
RNReanimated:
:podspec: "../node_modules/react-native-reanimated/RNReanimated.podspec"
RNScreens:
:podspec: "../node_modules/react-native-screens/RNScreens.podspec"
UMBarCodeScannerInterface:
:path: !ruby/object:Pathname
path: "../node_modules/unimodules-barcode-scanner-interface/ios"
Expand Down Expand Up @@ -228,7 +238,7 @@ EXTERNAL SOURCES:
path: "../node_modules/unimodules-permissions-interface/ios"
UMReactNativeAdapter:
:path: !ruby/object:Pathname
path: "../node_modules/@unimodules/react-native-adapter/ios"
path: "../node_modules/react-native-unimodules/node_modules/@unimodules/react-native-adapter/ios"
UMSensorsInterface:
:path: !ruby/object:Pathname
path: "../node_modules/unimodules-sensors-interface/ios"
Expand All @@ -241,35 +251,37 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
DoubleConversion: bb338842f62ab1d708ceb63ec3d999f0f3d98ecd
EXAppLoaderProvider: 7a8185228d8ba9e689a0e2d6d957fe9bdd49c8a0
EXConstants: 5d81e84ca71b9a552529889cc798b4a04e9e22b3
EXFileSystem: 091907902fcec9f9182b656fdead41a82f30986a
EXFont: c862449210fc86aa11d24a202cb22c71a0d39609
EXKeepAwake: e7cb6516675052b12a7d23291e33078b4239653a
EXLinearGradient: 40781b77e58f844c8dc4ad310dc9755b4d3792a7
EXLocation: 4eb76115832f08b1e78003b335c210e18fa60424
EXPermissions: 99e52dc3e5f8e55153f1958004f6df2a30a1f2f5
EXSQLite: 8dab6a5ab1b78be7925073d6071eb22095d4dda6
EXWebBrowser: def838b95aa9d396f9ce71ace4e614ee16e7ee30
EXAppLoaderProvider: 5d348813a9cf09b03bbe5b8b55437bc1bfbddbd1
EXConstants: 31e5318521be6175009af6ccd3e97dedf39da96a
EXFileSystem: 7e53a2c30a2eb6987ba6d5158ab908f947523228
EXFont: 71d07dc5d2153db7d1a23f1e0cc1b6341d55c432
EXKeepAwake: d4caf9a1a7691126ade4ca0b76592e93250a8f29
EXLinearGradient: ebfd46cb98a46330213e4945b96227d98f624054
EXLocation: 452a1d9edceb1b93deb86fd785236606d33742dd
EXPermissions: df10ad83df2f6b647aec304619354f8ab48d5f63
EXSQLite: ddc1e6727bd7d36e649f07590fe3ae5511c1f039
EXWebBrowser: 18924c3d2a3a1aa95d413672f058beff589c80f4
Folly: de497beb10f102453a1afa9edbf8cf8a251890de
glog: aefd1eb5dda2ab95ba0938556f34b98e2da3a60d
React: 36d0768f9e93be2473b37e7fa64f92c1d5341eef
react-native-safe-area-context: e380a6f783ccaec848e2f3cc8eb205a62362950d
RNGestureHandler: 5329a942fce3d41c68b84c2c2276ce06a696d8b0
RNReanimated: 7a52c90473b5e81c13408d40d797b98387eaddde
UMBarCodeScannerInterface: 84ea2d6b58ff0dc27ef9b68bab71286be18ee020
UMCameraInterface: 26b26005d1756a0d5f4f04f1e168e39ea9154535
UMConstantsInterface: 038bacb19de12b6fd328c589122c8dc977cccf61
UMCore: 733094f43f7244c60ce1f0592d00013ed68fa52c
UMFaceDetectorInterface: c9c3ae4cb045421283667a1698c2f31331f55e3f
UMFileSystemInterface: e9adc71027017de38eaf7d05fa58b2848ecb3797
UMFontInterface: f0c5846977ee8a93d7cfa8ae7e666772c727d195
UMImageLoaderInterface: 36e54e570acc4d720856f03ceebc441f73ea472c
UMPermissionsInterface: 938d010c74c43fcefc9bb990633a7c5a1631267e
UMReactNativeAdapter: 131ea2b944ade8035f0b54c6570c405f6000548d
UMSensorsInterface: 0ed023ce9b96f2ca6fada7bda05b7760da60b293
UMTaskManagerInterface: 8664abd37a00715727e60df9ecd65e42ba47b548
RNScreens: 402a99b0a27c0c32f079cec12d3ccbd35e20cd7f
UMBarCodeScannerInterface: d5a6fdc98ed6241225b0a8432a7f4e2b397668bc
UMCameraInterface: 68870a3197fee85bd5afca5609ba4a5b7257d19d
UMConstantsInterface: d25b8e8887ca7aaf568c06caf08f4d40734ee4ef
UMCore: 402cee150324974974f5c32b5404d8af65e4cff5
UMFaceDetectorInterface: 7b4f1a92f0c726b58b086296048efe193b570678
UMFileSystemInterface: aadb9a67aa6470d7ebc06cf04dc54fee6781ac48
UMFontInterface: 2d3c128285086bbed3d2a650f1d698323ef3b25a
UMImageLoaderInterface: 2829a7571a12d2e754c73c55ffe7e327d8402c7d
UMPermissionsInterface: b6a6e96db0f4011a25aaca14e6022529dd3d6e4e
UMReactNativeAdapter: e93109c6de5ea830d4a78d08f3a65b8d33a143a3
UMSensorsInterface: cf59dd7602764a2419e00167429be3e4be39c61d
UMTaskManagerInterface: 1e70fe58b872355f0ecb44fb81bb1a16484047f0
yoga: 684513b14b03201579ba3cee20218c9d1298b0cc

PODFILE CHECKSUM: 41592ff50a43d56f905dbf9c7eded4b358264eba
PODFILE CHECKSUM: 1276a2dd000c142ccc03272023bb8a6b2d5b9933

COCOAPODS: 1.7.5
12 changes: 7 additions & 5 deletions packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,23 @@
"start": "expo start",
"native": "react-native start",
"android": "react-native run-android",
"ios": "react-native run-ios"
"ios": "react-native run-ios",
"postinstall": "jetify"
},
"dependencies": {
"@expo/vector-icons": "^10.0.0",
"@react-native-community/masked-view": "^0.1.1",
"expo": "^35.0.0",
"expo-asset": "~7.0.0",
"query-string": "^6.8.3",
"react": "^16.8.3",
"react-dom": "^16.8.3",
"react-native": "^0.59.10",
"react": "~16.8.3",
"react-dom": "~16.8.3",
"react-native": "~0.59.10",
"react-native-gesture-handler": "~1.3.0",
"react-native-paper": "^3.0.0-alpha.3",
"react-native-reanimated": "~1.2.0",
"react-native-safe-area-context": "~0.3.6",
"react-native-screens": "~1.0.0-alpha.23",
"react-native-screens": "2.0.0-alpha.3",
"react-native-tab-view": "2.10.0",
"react-native-unimodules": "^0.7.0-rc.1",
"scheduler": "^0.16.1",
Expand All @@ -41,6 +42,7 @@
"@types/react-native": "^0.60.17",
"babel-preset-expo": "^7.0.0",
"expo-cli": "^3.1.2",
"jetifier": "^1.6.4",
"typescript": "^3.6.3"
}
}
Loading

0 comments on commit ba3f718

Please sign in to comment.