Skip to content

Commit 396a86e

Browse files
author
mcmurphy
committed
update packages to latest version and improve some page detail.
1 parent 11fefa3 commit 396a86e

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

+1556
-1319
lines changed

.eslintrc.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"env": {
3+
"browser": false,
4+
"es6": true
5+
},
6+
"extends": ["eslint:recommended","plugin:react/recommended"],
7+
"parserOptions": {
8+
"ecmaFeatures": {
9+
"experimentalObjectRestSpread": true,
10+
"jsx": true
11+
},
12+
"sourceType": "module"
13+
},
14+
"plugins": [
15+
"react",
16+
"react-native"
17+
],
18+
"rules": {
19+
"indent": [
20+
"error",
21+
"tab"
22+
],
23+
"linebreak-style": [
24+
"error",
25+
"windows"
26+
],
27+
"quotes": [
28+
"error",
29+
"single"
30+
],
31+
"semi": [
32+
"error",
33+
"always"
34+
]
35+
}
36+
}

.flowconfig

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,18 @@
11
[ignore]
2-
3-
# We fork some components by platform.
2+
; We fork some components by platform
43
.*/*[.]android.js
54

6-
# Ignore templates with `@flow` in header
7-
.*/local-cli/generator.*
8-
9-
# Ignore malformed json
10-
.*/node_modules/y18n/test/.*\.json
11-
12-
# Ignore the website subdir
13-
<PROJECT_ROOT>/website/.*
14-
15-
# Ignore BUCK generated dirs
5+
; Ignore "BUCK" generated dirs
166
<PROJECT_ROOT>/\.buckd/
177

18-
# Ignore unexpected extra @providesModule
19-
.*/node_modules/commoner/test/source/widget/share.js
8+
; Ignore unexpected extra "@providesModule"
209
.*/node_modules/.*/node_modules/fbjs/.*
2110

22-
# Ignore duplicate module providers
23-
# For RN Apps installed via npm, "Libraries" folder is inside node_modules/react-native but in the source repo it is in the root
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
2414
.*/Libraries/react-native/React.js
2515
.*/Libraries/react-native/ReactNative.js
26-
.*/node_modules/jest-runtime/build/__tests__/.*
2716

2817
[include]
2918

@@ -33,27 +22,26 @@ node_modules/react-native/flow
3322
flow/
3423

3524
[options]
36-
module.system=haste
25+
emoji=true
3726

38-
esproposal.class_static_fields=enable
39-
esproposal.class_instance_fields=enable
27+
module.system=haste
4028

4129
experimental.strict_type_args=true
4230

4331
munge_underscores=true
4432

45-
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
4633
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'
4734

4835
suppress_type=$FlowIssue
4936
suppress_type=$FlowFixMe
5037
suppress_type=$FixMe
5138

52-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-3]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
53-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-3]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
39+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
40+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
5441
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
42+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
5543

5644
unsafe.enable_getters_and_setters=true
5745

5846
[version]
59-
^0.33.0
47+
^0.40.0

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pbxproj -text

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,6 @@ buck-out/
4141
android/app/libs
4242
android/keystores/debug.keystore
4343
android/gradle.properties
44-
source/config/index.bak.js
44+
source/config/index.bak.js
45+
46+
__tests__

android/app/BUCK

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import re
2-
31
# To learn about Buck see [Docs](https://buckbuild.com/).
42
# To run your application with Buck:
53
# - install Buck
@@ -11,56 +9,57 @@ import re
119
#
1210

1311
lib_deps = []
12+
1413
for jarfile in glob(['libs/*.jar']):
15-
name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile)
14+
name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
1615
lib_deps.append(':' + name)
1716
prebuilt_jar(
1817
name = name,
1918
binary_jar = jarfile,
2019
)
2120

2221
for aarfile in glob(['libs/*.aar']):
23-
name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile)
22+
name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
2423
lib_deps.append(':' + name)
2524
android_prebuilt_aar(
2625
name = name,
2726
aar = aarfile,
2827
)
2928

3029
android_library(
31-
name = 'all-libs',
32-
exported_deps = lib_deps
30+
name = "all-libs",
31+
exported_deps = lib_deps,
3332
)
3433

3534
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-
],
35+
name = "app-code",
36+
srcs = glob([
37+
"src/main/java/**/*.java",
38+
]),
39+
deps = [
40+
":all-libs",
41+
":build_config",
42+
":res",
43+
],
4544
)
4645

4746
android_build_config(
48-
name = 'build_config',
49-
package = 'com.reactnativecnblogs',
47+
name = "build_config",
48+
package = "com.reactnativecnblogs",
5049
)
5150

5251
android_resource(
53-
name = 'res',
54-
res = 'src/main/res',
55-
package = 'com.reactnativecnblogs',
52+
name = "res",
53+
package = "com.reactnativecnblogs",
54+
res = "src/main/res",
5655
)
5756

5857
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-
],
58+
name = "app",
59+
keystore = "//android/keystores:debug",
60+
manifest = "src/main/AndroidManifest.xml",
61+
package_type = "debug",
62+
deps = [
63+
":app-code",
64+
],
6665
)

android/app/build.gradle

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ android {
9090
applicationId "com.reactnativecnblogs"
9191
minSdkVersion 16
9292
targetSdkVersion 22
93-
versionCode 350
94-
versionName "3.5.0"
93+
versionCode 360
94+
versionName "3.6.0"
9595
ndk {
9696
abiFilters "armeabi-v7a", "x86"
9797
}
@@ -114,14 +114,12 @@ android {
114114
}
115115
buildTypes {
116116
debug {
117-
buildConfigField "String", "CODEPUSH_KEY", "\"hvaWShPBzYKBPmCTHhuti7c2BivzNyj6RPzEb\""
118117
applicationIdSuffix ".debug"
119118
}
120119
release {
121120
signingConfig signingConfigs.release
122121
minifyEnabled enableProguardInReleaseBuilds
123122
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
124-
buildConfigField "String", "CODEPUSH_KEY", "\"Rmyzlv-ezw9bCaJyV-60CsN_LMxzNyj6RPzEb\""
125123
}
126124
}
127125
// applicationVariants are e.g. debug, release
@@ -140,11 +138,11 @@ android {
140138
}
141139

142140
dependencies {
143-
compile project(':react-native-code-push')
144141
compile fileTree(dir: "libs", include: ["*.jar"])
145142
compile "com.android.support:appcompat-v7:23.0.1"
146-
compile 'com.facebook.fresco:animated-gif:0.11.0'
147-
compile "com.facebook.react:react-native:+" // From node_modules
143+
compile 'com.facebook.fresco:animated-base-support:0.14.1'
144+
compile 'com.facebook.fresco:animated-gif:0.14.1'
145+
compile "com.facebook.react:react-native:+"
148146
compile project(':react-native-vector-icons')
149147
compile project(':react-native-toast')
150148
}

android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
<activity
2121
android:name=".MainActivity"
2222
android:label="@string/app_name"
23-
android:configChanges="keyboard|keyboardHidden|orientation|screenSize">
23+
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
24+
android:windowSoftInputMode="adjustResize">
2425
<intent-filter>
2526
<action android:name="android.intent.action.MAIN" />
2627
<category android:name="android.intent.category.LAUNCHER" />
Binary file not shown.
-3.18 KB
Binary file not shown.

android/app/src/main/java/com/reactnativecnblogs/MainApplication.java

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
package com.reactnativecnblogs;
22

33
import android.app.Application;
4-
import android.util.Log;
54

65
import com.facebook.react.ReactApplication;
7-
import com.facebook.react.ReactInstanceManager;
86
import com.facebook.react.ReactNativeHost;
97
import com.facebook.react.ReactPackage;
108
import com.facebook.react.shell.MainReactPackage;
119
import com.facebook.soloader.SoLoader;
1210
import com.oblador.vectoricons.VectorIconsPackage;
13-
import com.microsoft.codepush.react.CodePush;
1411
import com.remobile.toast.RCTToastPackage;
1512

1613
import java.util.Arrays;
@@ -20,22 +17,16 @@ public class MainApplication extends Application implements ReactApplication {
2017

2118
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
2219
@Override
23-
protected boolean getUseDeveloperSupport() {
20+
public boolean getUseDeveloperSupport() {
2421
return BuildConfig.DEBUG;
2522
}
2623

27-
@Override
28-
protected String getJSBundleFile() {
29-
return CodePush.getJSBundleFile();
30-
}
31-
3224
@Override
3325
protected List<ReactPackage> getPackages() {
3426
return Arrays.<ReactPackage>asList(
3527
new MainReactPackage(),
3628
new VectorIconsPackage(),
37-
new RCTToastPackage(),
38-
new CodePush(BuildConfig.CODEPUSH_KEY, MainApplication.this, BuildConfig.DEBUG)
29+
new RCTToastPackage()
3930
);
4031
}
4132
};

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:1.3.1'
8+
classpath 'com.android.tools.build:gradle:2.2.3'
99

1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip

android/keystores/BUCK

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
keystore(
2-
name = 'debug',
3-
store = 'debug.keystore',
4-
properties = 'debug.keystore.properties',
5-
visibility = [
6-
'PUBLIC',
7-
],
2+
name = "debug",
3+
properties = "debug.keystore.properties",
4+
store = "debug.keystore",
5+
visibility = [
6+
"PUBLIC",
7+
],
88
)

android/settings.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,5 @@ rootProject.name = 'reactNativeCnblogs'
33
include ':app'
44
include ':react-native-vector-icons'
55
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
6-
include ':react-native-code-push'
7-
project(':react-native-code-push').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-code-push/android/app')
86
include ':react-native-toast'
97
project(':react-native-toast').projectDir = new File(settingsDir, '../node_modules/@remobile/react-native-toast/android')

app.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "reactNativeCnblogs",
3+
"displayName": "博客园"
4+
}

index.android.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React,{
1+
import {
22
AppRegistry,
33
} from 'react-native';
44
import reactNativeCnblogs from './source';

index.ios.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React,{
1+
import {
22
AppRegistry,
33
} from 'react-native';
44
import reactNativeCnblogs from './source';

0 commit comments

Comments
 (0)