Skip to content

Commit e42ae5d

Browse files
committed
update example to 0.34
1 parent 27ca1d7 commit e42ae5d

File tree

9 files changed

+141
-209
lines changed

9 files changed

+141
-209
lines changed
Lines changed: 21 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,28 @@
11
[ignore]
22

33
# We fork some components by platform.
4-
.*/*.web.js
5-
.*/*.android.js
4+
.*/*[.]android.js
65

7-
# Some modules have their own node_modules with overlap
8-
.*/node_modules/node-haste/.*
9-
10-
# Ugh
11-
.*/node_modules/babel.*
12-
.*/node_modules/babylon.*
13-
.*/node_modules/invariant.*
14-
15-
# Ignore react and fbjs where there are overlaps, but don't ignore
16-
# anything that react-native relies on
17-
.*/node_modules/fbjs/lib/Map.js
18-
.*/node_modules/fbjs/lib/ErrorUtils.js
19-
20-
# Flow has a built-in definition for the 'react' module which we prefer to use
21-
# over the currently-untyped source
22-
.*/node_modules/react/react.js
23-
.*/node_modules/react/lib/React.js
24-
.*/node_modules/react/lib/ReactDOM.js
25-
26-
.*/__mocks__/.*
27-
.*/__tests__/.*
28-
29-
.*/commoner/test/source/widget/share.js
30-
31-
# Ignore commoner tests
32-
.*/node_modules/commoner/test/.*
33-
34-
# See https://github.com/facebook/flow/issues/442
35-
.*/react-tools/node_modules/commoner/lib/reader.js
36-
37-
# Ignore jest
38-
.*/node_modules/jest-cli/.*
39-
40-
# Ignore Website
41-
.*/website/.*
42-
43-
# Ignore generators
6+
# Ignore templates with `@flow` in header
447
.*/local-cli/generator.*
458

46-
# Ignore BUCK generated folders
47-
.*\.buckd/
9+
# Ignore malformed json
10+
.*/node_modules/y18n/test/.*\.json
4811

49-
# Ignore RNPM
50-
.*/local-cli/rnpm/.*
12+
# Ignore the website subdir
13+
<PROJECT_ROOT>/website/.*
5114

52-
.*/node_modules/is-my-json-valid/test/.*\.json
53-
.*/node_modules/iconv-lite/encodings/tables/.*\.json
54-
.*/node_modules/y18n/test/.*\.json
55-
.*/node_modules/spdx-license-ids/spdx-license-ids.json
56-
.*/node_modules/spdx-exceptions/index.json
57-
.*/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json
58-
.*/node_modules/resolve/lib/core.json
59-
.*/node_modules/jsonparse/samplejson/.*\.json
60-
.*/node_modules/json5/test/.*\.json
61-
.*/node_modules/ua-parser-js/test/.*\.json
62-
.*/node_modules/builtin-modules/builtin-modules.json
63-
.*/node_modules/binary-extensions/binary-extensions.json
64-
.*/node_modules/url-regex/tlds.json
65-
.*/node_modules/joi/.*\.json
66-
.*/node_modules/isemail/.*\.json
67-
.*/node_modules/tr46/.*\.json
15+
# Ignore BUCK generated dirs
16+
<PROJECT_ROOT>/\.buckd/
17+
18+
# Ignore unexpected extra @providesModule
19+
.*/node_modules/commoner/test/source/widget/share.js
6820

21+
# Ignore duplicate module providers
22+
# For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root
23+
.*/Libraries/react-native/React.js
24+
.*/Libraries/react-native/ReactNative.js
25+
.*/node_modules/jest-runtime/build/__tests__/.*
6926

7027
[include]
7128

@@ -91,9 +48,11 @@ suppress_type=$FlowIssue
9148
suppress_type=$FlowFixMe
9249
suppress_type=$FixMe
9350

94-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-6]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
95-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-6]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
51+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-2]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
52+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-2]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
9653
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
9754

55+
unsafe.enable_getters_and_setters=true
56+
9857
[version]
99-
^0.26.0
58+
^0.32.0

examples/FacebookTabsExample/android/app/BUCK

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import re
55
# - install Buck
66
# - `npm start` - to start the packager
77
# - `cd android`
8-
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US`
8+
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
99
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
1010
# - `buck install -r android/app` - compile, install and run application
1111
#

examples/FacebookTabsExample/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<uses-permission android:name="android.permission.INTERNET" />
55

66
<application
7+
android:name=".MainApplication"
78
android:allowBackup="true"
89
android:label="@string/app_name"
910
android:icon="@mipmap/ic_launcher"
Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
package com.facebooktabsexample;
22

33
import com.facebook.react.ReactActivity;
4-
import com.oblador.vectoricons.VectorIconsPackage;
5-
import com.facebook.react.ReactPackage;
6-
import com.facebook.react.shell.MainReactPackage;
7-
8-
import java.util.Arrays;
9-
import java.util.List;
104

115
public class MainActivity extends ReactActivity {
126

@@ -18,25 +12,4 @@ public class MainActivity extends ReactActivity {
1812
protected String getMainComponentName() {
1913
return "FacebookTabsExample";
2014
}
21-
22-
/**
23-
* Returns whether dev mode should be enabled.
24-
* This enables e.g. the dev menu.
25-
*/
26-
@Override
27-
protected boolean getUseDeveloperSupport() {
28-
return BuildConfig.DEBUG;
29-
}
30-
31-
/**
32-
* A list of packages used by the app. If the app uses additional views
33-
* or modules besides the default ones, add more packages here.
34-
*/
35-
@Override
36-
protected List<ReactPackage> getPackages() {
37-
return Arrays.<ReactPackage>asList(
38-
new MainReactPackage(),
39-
new VectorIconsPackage()
40-
);
41-
}
4215
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package com.facebooktabsexample;
2+
3+
import android.app.Application;
4+
import android.util.Log;
5+
6+
import com.facebook.react.ReactApplication;
7+
import com.oblador.vectoricons.VectorIconsPackage;
8+
import com.facebook.react.ReactInstanceManager;
9+
import com.facebook.react.ReactNativeHost;
10+
import com.facebook.react.ReactPackage;
11+
import com.facebook.react.shell.MainReactPackage;
12+
13+
import java.util.Arrays;
14+
import java.util.List;
15+
16+
public class MainApplication extends Application implements ReactApplication {
17+
18+
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
19+
@Override
20+
protected boolean getUseDeveloperSupport() {
21+
return BuildConfig.DEBUG;
22+
}
23+
24+
@Override
25+
protected List<ReactPackage> getPackages() {
26+
return Arrays.<ReactPackage>asList(
27+
new MainReactPackage(),
28+
new VectorIconsPackage()
29+
);
30+
}
31+
};
32+
33+
@Override
34+
public ReactNativeHost getReactNativeHost() {
35+
return mReactNativeHost;
36+
}
37+
}

0 commit comments

Comments
 (0)