Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8c81d84

Browse files
committed
Update example explorer to RN 0.25.1
1 parent ebe0899 commit 8c81d84

File tree

12 files changed

+140
-25
lines changed

12 files changed

+140
-25
lines changed

‎examples/Explorer/.buckconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
[android]
3+
target = Google Inc.:Google APIs:23
4+
5+
[maven_repositories]
6+
central = https://repo1.maven.org/maven2

‎examples/Explorer/.flowconfig

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@
1515
# Ignore react and fbjs where there are overlaps, but don't ignore
1616
# anything that react-native relies on
1717
.*/node_modules/fbjs/lib/Map.js
18-
.*/node_modules/fbjs/lib/Promise.js
1918
.*/node_modules/fbjs/lib/fetch.js
2019
.*/node_modules/fbjs/lib/ExecutionEnvironment.js
21-
.*/node_modules/fbjs/lib/isEmpty.js
22-
.*/node_modules/fbjs/lib/crc32.js
2320
.*/node_modules/fbjs/lib/ErrorUtils.js
2421

2522
# Flow has a built-in definition for the 'react' module which we prefer to use
@@ -28,6 +25,11 @@
2825
.*/node_modules/react/lib/React.js
2926
.*/node_modules/react/lib/ReactDOM.js
3027

28+
.*/__mocks__/.*
29+
.*/__tests__/.*
30+
31+
.*/commoner/test/source/widget/share.js
32+
3133
# Ignore commoner tests
3234
.*/node_modules/commoner/test/.*
3335

@@ -40,14 +42,43 @@
4042
# Ignore Website
4143
.*/website/.*
4244

45+
# Ignore generators
46+
.*/local-cli/generator.*
47+
48+
# Ignore BUCK generated folders
49+
.*\.buckd/
50+
51+
.*/node_modules/is-my-json-valid/test/.*\.json
52+
.*/node_modules/iconv-lite/encodings/tables/.*\.json
53+
.*/node_modules/y18n/test/.*\.json
54+
.*/node_modules/spdx-license-ids/spdx-license-ids.json
55+
.*/node_modules/spdx-exceptions/index.json
56+
.*/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json
57+
.*/node_modules/resolve/lib/core.json
58+
.*/node_modules/jsonparse/samplejson/.*\.json
59+
.*/node_modules/json5/test/.*\.json
60+
.*/node_modules/ua-parser-js/test/.*\.json
61+
.*/node_modules/builtin-modules/builtin-modules.json
62+
.*/node_modules/binary-extensions/binary-extensions.json
63+
.*/node_modules/url-regex/tlds.json
64+
.*/node_modules/joi/.*\.json
65+
.*/node_modules/isemail/.*\.json
66+
.*/node_modules/tr46/.*\.json
67+
68+
4369
[include]
4470

4571
[libs]
4672
node_modules/react-native/Libraries/react-native/react-native-interface.js
73+
node_modules/react-native/flow
74+
flow/
4775

4876
[options]
4977
module.system=haste
5078

79+
esproposal.class_static_fields=enable
80+
esproposal.class_instance_fields=enable
81+
5182
munge_underscores=true
5283

5384
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
@@ -57,9 +88,9 @@ suppress_type=$FlowIssue
5788
suppress_type=$FlowFixMe
5889
suppress_type=$FixMe
5990

60-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-1]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
61-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-1]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
91+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-3]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
92+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-3]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
6293
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
6394

6495
[version]
65-
0.21.0
96+
0.23.0

‎examples/Explorer/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,9 @@ local.properties
3232
#
3333
node_modules/
3434
npm-debug.log
35+
36+
# BUCK
37+
buck-out/
38+
\.buckd/
39+
android/app/libs
40+
android/keystores/debug.keystore

‎examples/Explorer/Page.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import React from "react";
1+
import React from 'react';
22
import {
3+
ListView,
34
StyleSheet,
45
Text,
5-
View,
6-
ListView,
76
TouchableHighlight,
7+
View,
88
} from 'react-native';
99

1010
import LeftCorner from './components/LeftCorner';

‎examples/Explorer/android/app/BUCK

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import re
2+
3+
# To learn about Buck see [Docs](https://buckbuild.com/).
4+
# To run your application with Buck:
5+
# - install Buck
6+
# - `npm start` - to start the packager
7+
# - `cd android`
8+
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US`
9+
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
10+
# - `buck install -r android/app` - compile, install and run application
11+
#
12+
13+
lib_deps = []
14+
for jarfile in glob(['libs/*.jar']):
15+
name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'1円', jarfile)
16+
lib_deps.append(':' + name)
17+
prebuilt_jar(
18+
name = name,
19+
binary_jar = jarfile,
20+
)
21+
22+
for aarfile in glob(['libs/*.aar']):
23+
name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'1円', aarfile)
24+
lib_deps.append(':' + name)
25+
android_prebuilt_aar(
26+
name = name,
27+
aar = aarfile,
28+
)
29+
30+
android_library(
31+
name = 'all-libs',
32+
exported_deps = lib_deps
33+
)
34+
35+
android_library(
36+
name = 'app-code',
37+
srcs = glob([
38+
'src/main/java/**/*.java',
39+
]),
40+
deps = [
41+
':all-libs',
42+
':build_config',
43+
':res',
44+
],
45+
)
46+
47+
android_build_config(
48+
name = 'build_config',
49+
package = 'com.explorer',
50+
)
51+
52+
android_resource(
53+
name = 'res',
54+
res = 'src/main/res',
55+
package = 'com.explorer',
56+
)
57+
58+
android_binary(
59+
name = 'app',
60+
package_type = 'debug',
61+
manifest = 'src/main/AndroidManifest.xml',
62+
keystore = '//android/keystores:debug',
63+
deps = [
64+
':app-code',
65+
],
66+
)

‎examples/Explorer/android/app/build.gradle

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import com.android.build.OutputFile
99
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
1010
* bundle directly from the development server. Below you can see all the possible configurations
1111
* and their defaults. If you decide to add a configuration block, make sure to add it before the
12-
* `apply from: "react.gradle"` line.
12+
* `apply from: "../../node_modules/react-native/react.gradle"` line.
1313
*
1414
* project.ext.react = [
1515
* // the name of the generated asset file containing your JS bundle
@@ -59,7 +59,7 @@ import com.android.build.OutputFile
5959
* ]
6060
*/
6161

62-
apply from: "react.gradle"
62+
apply from: "../../node_modules/react-native/react.gradle"
6363

6464
/**
6565
* Set this to true to create two separate APKs instead of one:
@@ -124,3 +124,10 @@ dependencies {
124124
compile "com.android.support:appcompat-v7:23.0.1"
125125
compile "com.facebook.react:react-native:+" // From node_modules
126126
}
127+
128+
// Run this once to be able to run the application with BUCK
129+
// puts all compile dependencies into folder libs for BUCK to use
130+
task copyDownloadableDepsToLibs(type: Copy) {
131+
from configurations.compile
132+
into 'libs'
133+
}

‎examples/Explorer/android/app/proguard-rules.pro

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,3 @@
6161
-dontwarn java.nio.file.*
6262
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
6363
-dontwarn okio.**
64-
65-
# stetho
66-
67-
-dontwarn com.facebook.stetho.**

‎examples/Explorer/components/LeftCorner.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import React, {PropTypes} from "react";
1+
import React, {PropTypes} from 'react';
22
import {
3+
Image,
34
StyleSheet,
4-
View,
55
TouchableHighlight,
6-
Image,
6+
View,
77
} from 'react-native';
88

99
const propTypes = {

‎examples/Explorer/components/RightCorner.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import React from "react";
1+
import React from 'react';
22
import {
3+
Alert,
4+
Image,
35
StyleSheet,
4-
View,
56
TouchableHighlight,
6-
Image,
7-
Alert,
7+
View,
88
} from 'react-native';
99

1010
const styles = StyleSheet.create({

‎examples/Explorer/ios/Explorer/AppDelegate.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
3636
/**
3737
* OPTION 2
3838
* Load from pre-bundled file on disk. The static bundle is automatically
39-
* generated by "Bundle React Native code and images" build step.
39+
* generated by the "Bundle React Native code and images" build step when
40+
* running the project on an actual device or running the project on the
41+
* simulator in the "Release" build configuration.
4042
*/
4143

4244
// jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /