Skip to content

Commit a23dfd4

Browse files
committed
chore: remove nohoist from example
1 parent e6fade0 commit a23dfd4

File tree

18 files changed

+214
-211
lines changed

18 files changed

+214
-211
lines changed

.github/workflows/main.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,8 @@ jobs:
6161
- name: Build Detox
6262
if: steps.detox-cache.outputs.cache-hit != 'true'
6363
run: |
64-
cd example
6564
detox build --configuration ios.sim.release
6665
6766
- name: Run Detox tests
6867
run: |
69-
cd example
7068
detox test --configuration ios.sim.release --cleanup --debug-synchronization 200

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ Remember to add tests for your change if possible. Run the unit tests by:
4141
yarn test
4242
```
4343

44-
Running Detox (on iOS) requires the following:
44+
Running the e2e tests with Detox (on iOS) requires the following:
4545

4646
- Mac with macOS (at least macOS High Sierra 10.13.6)
4747
- Xcode 10.1+ with Xcode command line tools
4848

49-
To run the integration tests, first you need to install `applesimutils` and `detox-cli`:
49+
First you need to install `applesimutils` and `detox-cli`:
5050

5151
```sh
5252
brew tap wix/brew
@@ -57,7 +57,6 @@ yarn global add detox-cli
5757
Then you can build and run the tests:
5858

5959
```sh
60-
cd example
6160
detox build -c ios.sim.debug
6261
detox test -c ios.sim.debug
6362
```

example/App.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
import 'react-native-gesture-handler';
2+
import { registerRootComponent } from 'expo';
23

3-
export { default } from './src/index';
4+
import App from './src/index';
5+
6+
registerRootComponent(App);

example/android/app/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ project.ext.react = [
8080
enableHermes: false, // clean and rebuild if changing
8181
]
8282

83-
apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
84-
apply from: "../../node_modules/react-native/react.gradle"
83+
apply from: '../../../node_modules/react-native-unimodules/gradle.groovy'
84+
apply from: "../../../node_modules/react-native/react.gradle"
8585

8686
/**
8787
* Set this to true to create two separate APKs instead of one:
@@ -179,10 +179,10 @@ android {
179179
dependencies {
180180
implementation fileTree(dir: "libs", include: ["*.jar"])
181181
implementation "com.facebook.react:react-native:+" // From node_modules
182-
addUnimodulesDependencies()
182+
addUnimodulesDependencies([ modulesPaths : ['../../../node_modules'] ])
183183

184184
if (enableHermes) {
185-
def hermesPath = "../../node_modules/hermes-engine/android/";
185+
def hermesPath = "../../../node_modules/hermes-engine/android/";
186186
debugImplementation files(hermesPath + "hermes-debug.aar")
187187
releaseImplementation files(hermesPath + "hermes-release.aar")
188188
} else {
@@ -197,4 +197,4 @@ task copyDownloadableDepsToLibs(type: Copy) {
197197
into 'libs'
198198
}
199199

200-
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
200+
apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

example/android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ allprojects {
2424
mavenLocal()
2525
maven {
2626
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
27-
url("$rootDir/../node_modules/react-native/android")
27+
url("$rootDir/../../node_modules/react-native/android")
2828
}
2929
maven {
3030
// Android JSC is installed from npm
31-
url("$rootDir/../node_modules/jsc-android/dist")
31+
url("$rootDir/../../node_modules/jsc-android/dist")
3232
}
3333

3434
google()

example/android/settings.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
apply from: '../node_modules/react-native-unimodules/gradle.groovy'
2-
includeUnimodulesProjects()
1+
apply from: '../../node_modules/react-native-unimodules/gradle.groovy'
2+
includeUnimodulesProjects([ modulesPaths : ['../../../node_modules'] ])
33

44

55
rootProject.name = 'ReactNavigationExample'
6-
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
6+
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
77
include ':app'

example/app.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
2+
"name": "ReactNavigationExample",
3+
"displayName": "React Navigation Example",
24
"expo": {
35
"name": "@react-navigation/example",
46
"slug": "react-navigation-example",
7+
"description": "Demo app to showcase various functionality of React Navigation",
58
"privacy": "public",
69
"sdkVersion": "36.0.0",
710
"platforms": [
@@ -25,9 +28,6 @@
2528
"ios": {
2629
"supportsTablet": true
2730
},
28-
"entryPoint": "node_modules/expo/AppEntry.js",
29-
"description": "Demo app to showcase various functionality of React Navigation"
30-
},
31-
"displayName": "React Navigation Example",
32-
"name": "ReactNavigationExample"
31+
"entryPoint": "App.tsx"
32+
}
3333
}

example/e2e/.eslintrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"settings": {
3+
"import/core-modules": [
4+
"detox",
5+
"detox/runners/jest/adapter",
6+
"detox/runners/jest/specReporter"
7+
]
8+
},
9+
"env": { "jest": true, "jasmine": true }
10+
}

example/e2e/config.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"setupFilesAfterEnv": ["./init.js"],
3-
"testEnvironment": "node",
4-
"reporters": ["detox/runners/jest/streamlineReporter"],
5-
"verbose": true
2+
"setupFilesAfterEnv": ["./init.js"],
3+
"testEnvironment": "node",
4+
"reporters": ["detox/runners/jest/streamlineReporter"],
5+
"verbose": true
66
}

example/e2e/init.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
/* eslint-disable import/no-commonjs, jest/no-jasmine-globals */
2-
/* eslint-env jest, jasmine */
1+
/* eslint-disable jest/no-jasmine-globals, import/no-commonjs */
32

43
const detox = require('detox');
5-
const config = require('../package.json').detox;
4+
const config = require('../../package.json').detox;
65
const adapter = require('detox/runners/jest/adapter');
76
const specReporter = require('detox/runners/jest/specReporter');
87

example/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import { AppRegistry } from 'react-native';
2-
3-
// Need to add extension or eslint confuses it with app.json
4-
import App from './App.tsx';
2+
import App from './src/index.tsx';
53

64
AppRegistry.registerComponent('ReactNavigationExample', () => App);

example/ios/Podfile

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
platform :ios, '10.0'
2-
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3-
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
2+
require_relative '../../node_modules/@react-native-community/cli-platform-ios/native_modules'
3+
require_relative '../../node_modules/react-native-unimodules/cocoapods.rb'
44

55
target 'ReactNavigationExample' do
66
# Pods for ReactNavigationExample
7-
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
8-
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
9-
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
10-
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
11-
pod 'React', :path => '../node_modules/react-native/'
12-
pod 'React-Core', :path => '../node_modules/react-native/'
13-
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
14-
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
15-
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
16-
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
17-
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
18-
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
19-
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
20-
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
21-
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
22-
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
23-
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
24-
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
7+
pod 'FBLazyVector', :path => '../../node_modules/react-native/Libraries/FBLazyVector'
8+
pod 'FBReactNativeSpec', :path => '../../node_modules/react-native/Libraries/FBReactNativeSpec'
9+
pod 'RCTRequired', :path => '../../node_modules/react-native/Libraries/RCTRequired'
10+
pod 'RCTTypeSafety', :path => '../../node_modules/react-native/Libraries/TypeSafety'
11+
pod 'React', :path => '../../node_modules/react-native/'
12+
pod 'React-Core', :path => '../../node_modules/react-native/'
13+
pod 'React-CoreModules', :path => '../../node_modules/react-native/React/CoreModules'
14+
pod 'React-Core/DevSupport', :path => '../../node_modules/react-native/'
15+
pod 'React-RCTActionSheet', :path => '../../node_modules/react-native/Libraries/ActionSheetIOS'
16+
pod 'React-RCTAnimation', :path => '../../node_modules/react-native/Libraries/NativeAnimation'
17+
pod 'React-RCTBlob', :path => '../../node_modules/react-native/Libraries/Blob'
18+
pod 'React-RCTImage', :path => '../../node_modules/react-native/Libraries/Image'
19+
pod 'React-RCTLinking', :path => '../../node_modules/react-native/Libraries/LinkingIOS'
20+
pod 'React-RCTNetwork', :path => '../../node_modules/react-native/Libraries/Network'
21+
pod 'React-RCTSettings', :path => '../../node_modules/react-native/Libraries/Settings'
22+
pod 'React-RCTText', :path => '../../node_modules/react-native/Libraries/Text'
23+
pod 'React-RCTVibration', :path => '../../node_modules/react-native/Libraries/Vibration'
24+
pod 'React-Core/RCTWebSocket', :path => '../../node_modules/react-native/'
2525

26-
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
27-
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
28-
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
29-
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
30-
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
31-
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
32-
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
26+
pod 'React-cxxreact', :path => '../../node_modules/react-native/ReactCommon/cxxreact'
27+
pod 'React-jsi', :path => '../../node_modules/react-native/ReactCommon/jsi'
28+
pod 'React-jsiexecutor', :path => '../../node_modules/react-native/ReactCommon/jsiexecutor'
29+
pod 'React-jsinspector', :path => '../../node_modules/react-native/ReactCommon/jsinspector'
30+
pod 'ReactCommon/jscallinvoker', :path => '../../node_modules/react-native/ReactCommon'
31+
pod 'ReactCommon/turbomodule/core', :path => '../../node_modules/react-native/ReactCommon'
32+
pod 'Yoga', :path => '../../node_modules/react-native/ReactCommon/yoga'
3333

34-
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
35-
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
36-
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
34+
pod 'DoubleConversion', :podspec => '../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
35+
pod 'glog', :podspec => '../../node_modules/react-native/third-party-podspecs/glog.podspec'
36+
pod 'Folly', :podspec => '../../node_modules/react-native/third-party-podspecs/Folly.podspec'
3737

3838
use_native_modules!
39-
use_unimodules!
39+
use_unimodules!({ modules_paths: ['../../node_modules'] })
4040
end

0 commit comments

Comments
 (0)