Skip to content

Commit 06df286

Browse files
committed
Updated mobile to react 16 fiber
1 parent 5889da7 commit 06df286

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2857
-1677
lines changed

README.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,23 @@ git clone --depth 1 https://github.com/agrcrobles/react-native-web-workspace
1616
### Lerna
1717
lerna it is used to hoist dependencies from a project root and speed up the development while splitting the platform from the code
1818

19-
```
19+
```console
20+
## it cleans node_modules
2021
npm run clean
21-
npm run bootstrap // it installs symlinks
22+
## it installs dependencies
23+
npm install
24+
## it installs symlinks
25+
npm run bootstrap
2226
```
2327

2428
### More info
2529
- [react-native-web-workspace/navigation-playground](https://github.com/agrcrobles/react-native-web-workspace/tree/master/react-navigation-playground)
2630
- [react-native-web-workspace/web](https://github.com/agrcrobles/react-native-web-workspace/tree/master/web)
2731
- [react-native-web-workspace/mobile](https://github.com/agrcrobles/react-native-web-workspace/tree/master/mobile)
2832

29-
## Contribute
30-
31-
The following improvements and PR could be accepted:
33+
## Related projects
3234

33-
- Move from yarn to npm@5
34-
- Using lerna workspaces: Workspaces adds support for managing multiple packages within a single Yarn project. Linking between them on install to make cross-development simpler.
35+
* [yarn-workspaces-cra-crna](https://github.com/viewstools/yarn-workspaces-cra-crna) explains how to use yarn workspaces with Create React App and Create React Native App (Expo) to share common code across.
3536

3637
## License
3738

mobile/.babelrc

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
{
2-
"presets": [
3-
"react-native"
4-
]
5-
}
1+
{
2+
"presets": ["react-native"]
3+
}

mobile/.flowconfig

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
[ignore]
2+
; We fork some components by platform
3+
.*/*[.]android.js
4+
5+
; Ignore "BUCK" generated dirs
6+
<PROJECT_ROOT>/\.buckd/
7+
8+
; Ignore unexpected extra "@providesModule"
9+
.*/node_modules/.*/node_modules/fbjs/.*
10+
11+
; Ignore duplicate module providers
12+
; For RN Apps installed via npm, "Libraries" folder is inside
13+
; "node_modules/react-native" but in the source repo it is in the root
14+
.*/Libraries/react-native/React.js
15+
16+
; Ignore polyfills
17+
.*/Libraries/polyfills/.*
18+
19+
[include]
20+
21+
[libs]
22+
node_modules/react-native/Libraries/react-native/react-native-interface.js
23+
node_modules/react-native/flow/
24+
25+
[options]
26+
emoji=true
27+
28+
module.system=haste
29+
30+
munge_underscores=true
31+
32+
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
33+
34+
suppress_type=$FlowIssue
35+
suppress_type=$FlowFixMe
36+
suppress_type=$FlowFixMeProps
37+
suppress_type=$FlowFixMeState
38+
suppress_type=$FixMe
39+
40+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-7]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
41+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-7]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
42+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
43+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
44+
45+
unsafe.enable_getters_and_setters=true
46+
47+
[version]
48+
^0.57.0

mobile/.gitignore

+10-12
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ build/
3030
local.properties
3131
*.iml
3232

33+
# node.js
34+
#
35+
node_modules/
36+
npm-debug.log
37+
yarn-error.log
38+
3339
# BUCK
3440
buck-out/
3541
\.buckd/
@@ -40,20 +46,12 @@ buck-out/
4046
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
4147
# screenshots whenever they are needed.
4248
# For more information about the recommended setup visit:
43-
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
49+
# https://docs.fastlane.tools/best-practices/source-control/
4450

45-
fastlane/report.xml
46-
fastlane/Preview.html
47-
fastlane/screenshots
51+
*/fastlane/report.xml
52+
*/fastlane/Preview.html
53+
*/fastlane/screenshots
4854

4955
# Haul
5056
#
5157
haul-debug.log
52-
.happypack
53-
54-
# flowtype
55-
#
56-
.flowconfig
57-
58-
# coverage
59-
coverage

mobile/.watchmanconfig

-1
This file was deleted.

mobile/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
## mobile
44

55
### Run the app with haul
6-
```
6+
```console
77
cd mobile
8-
npm start -- --platform android
8+
## on android
9+
yarn haul start --platform android
910
react-native run-android
10-
# on android
1111

12-
npm start -- --platform ios
12+
## on ios
13+
yarn haul start --platform ios
1314
react-native run-ios
14-
# on ios
1515
```
1616

1717
Prerequisites: Node version 6.0 or higher and npm version 3.0 or higher as well as android or ios running.

mobile/__tests__/index.android.js

-12
This file was deleted.

mobile/__tests__/index.ios.js

-12
This file was deleted.

mobile/android/app/BUCK

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ android_library(
4545

4646
android_build_config(
4747
name = "build_config",
48-
package = "com.linking",
48+
package = "com.mobile",
4949
)
5050

5151
android_resource(
5252
name = "res",
53-
package = "com.linking",
53+
package = "com.mobile",
5454
res = "src/main/res",
5555
)
5656

mobile/android/app/build.gradle

+5-5
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,13 @@ import com.android.build.OutputFile
7272
* ]
7373
*/
7474

75-
/**
76-
* haul
77-
*/
78-
75+
project.ext.react = [
76+
entryFile: "index.js"
77+
]
7978
project.ext.react = [
8079
cliPath: "node_modules/haul/bin/cli.js"
8180
]
81+
8282
apply from: "../../node_modules/react-native/react.gradle"
8383

8484
/**
@@ -101,7 +101,7 @@ android {
101101
buildToolsVersion "23.0.1"
102102

103103
defaultConfig {
104-
applicationId "com.linking"
104+
applicationId "com.mobile"
105105
minSdkVersion 16
106106
targetSdkVersion 22
107107
versionCode 1

mobile/android/app/src/main/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="com.linking"
2+
package="com.mobile"
33
android:versionCode="1"
44
android:versionName="1.0">
55

Binary file not shown.
Binary file not shown.
Binary file not shown.

mobile/android/app/src/main/java/com/linking/MainActivity.java renamed to mobile/android/app/src/main/java/com/mobile/MainActivity.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.linking;
1+
package com.mobile;
22

33
import com.facebook.react.ReactActivity;
44

@@ -10,6 +10,6 @@ public class MainActivity extends ReactActivity {
1010
*/
1111
@Override
1212
protected String getMainComponentName() {
13-
return "linking";
13+
return "mobile";
1414
}
1515
}

mobile/android/app/src/main/java/com/linking/MainApplication.java renamed to mobile/android/app/src/main/java/com/mobile/MainApplication.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.linking;
1+
package com.mobile;
22

33
import android.app.Application;
44

@@ -27,6 +27,11 @@ protected List<ReactPackage> getPackages() {
2727
new VectorIconsPackage()
2828
);
2929
}
30+
31+
@Override
32+
protected String getJSMainModuleName() {
33+
return "index";
34+
}
3035
};
3136

3237
@Override
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<resources>
2-
<string name="app_name">linking</string>
2+
<string name="app_name">mobile</string>
33
</resources>

mobile/android/settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
rootProject.name = 'linking'
1+
rootProject.name = 'mobile'
22
include ':react-native-vector-icons'
33
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
44

mobile/app.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"name": "linking",
3-
"displayName": "linking"
2+
"name": "mobile",
3+
"displayName": "mobile"
44
}

mobile/coverage/clover.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<coverage generated="1515013061066" clover="3.2.0">
3+
<project timestamp="1515013061066" name="All files">
4+
<metrics statements="0" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0" elements="0" coveredelements="0" complexity="0" loc="0" ncloc="0" packages="0" files="0" classes="0">
5+
</metrics>
6+
</project>
7+
</coverage>

mobile/coverage/coverage-final.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)