Bump RN to 0.46 +deps

- Fix npm test (jest)
- Remove material-kit for now
This commit is contained in:
nikolark committed 2017-07-17 22:16:14 +02:00
1 parent da364c4852
commit 47b4a36ecc
15 files changed
+1054 -669

No files matched your search

+2 -2
View File
@@ -1,3 +1,3 @@
{
"presets": ["react-native"]
}
"presets": ["react-native"]
}
+3 -5
View File
@@ -26,8 +26,6 @@ emoji=true
module.system=haste
experimental.strict_type_args=true
munge_underscores=true
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'
@@ -36,12 +34,12 @@ suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-0]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
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]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-7]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-7]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
unsafe.enable_getters_and_setters=true
[version]
^0.40.0
^0.47.0
+2 -2
View File
@@ -1,12 +1,12 @@
import 'react-native';
import React from 'react';
import Index from '../index.android.js';
import App from '../index.android.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
<App />
);
});
+2 -2
View File
@@ -1,12 +1,12 @@
import 'react-native';
import React from 'react';
import Index from '../index.ios.js';
import App from '../index.ios.js';
// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';
it('renders correctly', () => {
const tree = renderer.create(
<Index />
<App />
);
});
+9 -3
View File
@@ -33,6 +33,13 @@ import com.android.build.OutputFile
* // bundleInPaidRelease: true,
* // bundleInBeta: true,
*
* // whether to disable dev mode in custom build variants (by default only disabled in release)
* // for example: to disable dev mode in the staging build type (if configured)
* devDisabledInStaging: true,
* // The configuration property can be in the following formats
* // 'devDisabledIn${productFlavor}${buildType}'
* // 'devDisabledIn${buildType}'
*
* // the root of your project, i.e. where "package.json" lives
* root: "../../",
*
@@ -58,7 +65,7 @@ import com.android.build.OutputFile
* inputExcludes: ["android/**", "ios/**"],
*
* // override which node gets called and with what additional arguments
* nodeExecutableAndArgs: ["node"]
* nodeExecutableAndArgs: ["node"],
*
* // supply additional arguments to the packager
* extraPackagerArgs: []
@@ -84,7 +91,7 @@ def enableProguardInReleaseBuilds = false
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.dusken"
@@ -126,7 +133,6 @@ android {
}
dependencies {
compile project(':react-native-material-kit')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
+4
View File
@@ -50,6 +50,10 @@
-dontwarn com.facebook.react.**
# TextLayoutBuilder uses a non-public Android constructor within StaticLayout.
# See libs/proxy/src/main/java/com/facebook/fbui/textlayoutbuilder/proxy for details.
-dontwarn android.text.StaticLayout
# okhttp
-keepattributes Signature
@@ -3,7 +3,6 @@ package com.dusken;
import android.app.Application;
import com.facebook.react.ReactApplication;
import com.github.xinthink.rnmk.ReactMaterialKitPackage;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
@@ -24,8 +23,7 @@ public class MainApplication extends Application implements ReactApplication {
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new ReactMaterialKitPackage()
new MainReactPackage()
);
}
};
-2
View File
@@ -1,5 +1,3 @@
rootProject.name = 'Dusken'
include ':react-native-material-kit'
project(':react-native-material-kit').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-material-kit/android')
include ':app'
+1 -1
View File
@@ -7,7 +7,7 @@ import duskenApp from "./src/reducers";
let store = createStore(duskenApp);
class App extends Component {
export default class App extends Component {
render() {
return (
<Provider store={store}>
+1 -1
View File
@@ -7,7 +7,7 @@ import duskenApp from "./src/reducers";
let store = createStore(duskenApp);
class App extends Component {
export default class App extends Component {
render() {
return (
<Provider store={store}>
+20 -9
View File
@@ -35,7 +35,6 @@
2DCD954D1E0B4F2C00145EB5 /* DuskenTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* DuskenTests.m */; };
5E9157361DD0AC6A00FF2AA8 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E9157331DD0AC6500FF2AA8 /* libRCTAnimation.a */; };
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; };
D4A3DCAB98524B2A9E641E38 /* libRCTMaterialKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 24CEE28BE13A496CB7E58C9F /* libRCTMaterialKit.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -255,8 +254,6 @@
5E91572D1DD0AC6500FF2AA8 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = "<group>"; };
78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = "<group>"; };
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = "<group>"; };
1816E6C5FE584A80980C19AF /* RCTMaterialKit.xcodeproj */ = {isa = PBXFileReference; name = "RCTMaterialKit.xcodeproj"; path = "../node_modules/react-native-material-kit/iOS/RCTMaterialKit.xcodeproj"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = wrapper.pb-project; explicitFileType = undefined; includeInIndex = 0; };
24CEE28BE13A496CB7E58C9F /* libRCTMaterialKit.a */ = {isa = PBXFileReference; name = "libRCTMaterialKit.a"; path = "libRCTMaterialKit.a"; sourceTree = "<group>"; fileEncoding = undefined; lastKnownFileType = archive.ar; explicitFileType = undefined; includeInIndex = 0; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -283,7 +280,6 @@
832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */,
00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */,
139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */,
D4A3DCAB98524B2A9E641E38 /* libRCTMaterialKit.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -450,7 +446,6 @@
832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */,
00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */,
139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */,
1816E6C5FE584A80980C19AF /* RCTMaterialKit.xcodeproj */,
);
name = Libraries;
sourceTree = "<group>";
@@ -878,7 +873,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = {
isa = PBXShellScriptBuildPhase;
@@ -892,7 +887,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
};
/* End PBXShellScriptBuildPhase section */
@@ -978,7 +973,9 @@
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Dusken.app/Dusken";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
);
};
name = Debug;
@@ -999,7 +996,9 @@
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Dusken.app/Dusken";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/$(TARGET_NAME)\"",
);
HEADER_SEARCH_PATHS = (
"$(inherited)",
);
};
name = Release;
@@ -1019,6 +1018,9 @@
);
PRODUCT_NAME = Dusken;
VERSIONING_SYSTEM = "apple-generic";
HEADER_SEARCH_PATHS = (
"$(inherited)",
);
};
name = Debug;
};
@@ -1036,6 +1038,9 @@
);
PRODUCT_NAME = Dusken;
VERSIONING_SYSTEM = "apple-generic";
HEADER_SEARCH_PATHS = (
"$(inherited)",
);
};
name = Release;
};
@@ -1062,6 +1067,9 @@
SDKROOT = appletvos;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.2;
HEADER_SEARCH_PATHS = (
"$(inherited)",
);
};
name = Debug;
};
@@ -1088,6 +1096,9 @@
SDKROOT = appletvos;
TARGETED_DEVICE_FAMILY = 3;
TVOS_DEPLOYMENT_TARGET = 9.2;
HEADER_SEARCH_PATHS = (
"$(inherited)",
);
};
name = Release;
};
+1 -1
View File
@@ -37,7 +37,7 @@
- (void)testRendersWelcomeScreen
{
UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController];
UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
BOOL foundElement = NO;
+13 -10
View File
@@ -7,19 +7,22 @@
"test": "jest"
},
"dependencies": {
"react": "16.0.0-alpha.6",
"react-native": "0.43.3",
"react-native-material-kit": "^0.4.1",
"react-redux": "^5.0.2",
"redux": "^3.6.0"
"prop-types": "^15.5.10",
"react": "16.0.0-alpha.12",
"react-native": "0.46.3",
"react-redux": "^5.0.5",
"redux": "^3.7.2"
},
"devDependencies": {
"babel-jest": "18.0.0",
"babel-preset-react-native": "1.9.1",
"jest": "18.1.0",
"react-test-renderer": "~15.4.0-rc.4"
"babel-jest": "20.0.3",
"babel-preset-react-native": "1.9.2",
"jest": "20.0.4",
"react-test-renderer": "16.0.0-alpha.12"
},
"jest": {
"preset": "react-native"
"preset": "react-native",
"transformIgnorePatterns": [
"node_modules/(?!react-native|tcomb-form-native|apsl-react-native-button,react-native-device-info|react-clone-referenced-element)"
]
}
}
+20 -23
View File
@@ -1,6 +1,5 @@
import React, { Component } from 'react';
import { Image, StyleSheet, Text, View } from 'react-native';
import { MKButton, MKColor, MKTextField } from 'react-native-material-kit';
import {Button, Image, StyleSheet, Text, TextInput, View} from 'react-native';
import { loginStart } from "../../actions";
@@ -12,9 +11,7 @@ export default class Login extends Component {
}
}
componentWillReceiveProps(nextProps) {
console.log("IN Login.componentWillReceiveProps");
console.log(nextProps);
if(this.state.loggedIn != nextProps.loggedIn) {
if(this.state.loggedIn !== nextProps.loggedIn) {
this.setState({
loggedIn: nextProps.loggedIn
})
@@ -26,32 +23,29 @@ export default class Login extends Component {
};
return (
<View style={styles.container}>
<Text>Chateau Neuf</Text>
<Text>The Norwegian Student Society</Text>
<Text style={styles.text}>The Norwegian Student Society</Text>
<Text style={styles.text}>Chateau Neuf</Text>
<Image source={pic} style={{width: 200, height: 150, marginBottom: 40}} resizeMode='contain' />
<MKTextField
<TextInput
placeholder="Email"
style={styles.input}
/>
<MKTextField
<TextInput
placeholder="Password"
style={styles.input}
/>
<MKButton
backgroundColor={MKColor.Blue}
shadowRadius={2}
shadowOpacity={.7}
shadowColor="black"
onPress={this.onLoginPress}
style={{marginTop: 20}}
>
<Text pointerEvents="none" style={styles.button}>Log in</Text>
</MKButton>
<View style={styles.button}>
<Button
title="Log in"
onPress={this.onLoginPress}
/>
</View>
<Text style={{paddingTop: 10}}>{this.loginState()}</Text>
</View>
);
}
onLoginPress = () => {
console.log("YO from onLoginPress");
this.props.dispatch(loginStart())
};
@@ -72,13 +66,16 @@ const styles = StyleSheet.create({
},
input: {
width: 240,
height: 50,
fontSize: 20,
height: 52,
},
button: {
fontWeight: 'bold',
marginTop: 20,
padding: 10,
width: 240,
textAlign: 'center',
color: 'white',
},
text: {
fontSize: 18,
fontWeight: 'bold'
}
});
+975 -605
View File
File diff suppressed because it is too large. Load diff