* Init travis configuration

* Try travis

* Try travis

* Try travis

* Try travis

* Try travis

* Try Travis

* Fiz name and add badges
This commit is contained in:
Rodrigo Nascimento 2017-08-18 11:50:20 -03:00 committed by GitHub
parent f630960105
commit d2c110b7af
12 changed files with 58 additions and 133 deletions

41
.travis.yml Normal file
View File

@ -0,0 +1,41 @@
matrix:
include:
- os: linux
dist: trusty
sudo: false
language: android
before_install:
- openssl aes-256-cbc -K $encrypted_985c748be78d_key -iv $encrypted_985c748be78d_iv -in key.keystore.enc -out android/app/key.keystore -d
- mkdir -p ~/.gradle
- echo -e "ROCKETCHAT_RN_RELEASE_STORE_FILE=$ROCKETCHAT_RN_RELEASE_STORE_FILE" > ~/.gradle/gradle.properties
- echo -e "ROCKETCHAT_RN_RELEASE_STORE_PASSWORD=$ROCKETCHAT_RN_RELEASE_STORE_PASSWORD" >> ~/.gradle/gradle.properties
- echo -e "ROCKETCHAT_RN_RELEASE_KEY_ALIAS=$ROCKETCHAT_RN_RELEASE_KEY_ALIAS" >> ~/.gradle/gradle.properties
- echo -e "ROCKETCHAT_RN_RELEASE_KEY_PASSWORD=$ROCKETCHAT_RN_RELEASE_KEY_PASSWORD" >> ~/.gradle/gradle.properties
- nvm install 8
- node --version
install:
- npm install
android:
components:
- tools
- build-tools-23.0.1
- build-tools-25.0.1
- build-tools-26.0.1
- android-23
- android-25
- android-26
- extra-android-m2repository
- extra-google-google_play_services
- extra-google-m2repository
- addon-google_apis-google-16
script:
- npm run ci
- cd android && ./gradlew assembleRelease
- os: osx
osx_image: xcode8.3
language: node_js
node_js: 8
script:
- npm run ci

BIN
Logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 602 KiB

After

Width:  |  Height:  |  Size: 260 KiB

View File

@ -1,5 +1,9 @@
# Rocket.Chat React Native Mobile
[![Build Status](https://img.shields.io/travis/RocketChat/Rocket.Chat.ReactNative/master.svg)](https://travis-ci.org/RocketChat/Rocket.Chat.ReactNative)
[![Project Dependencies](https://david-dm.org/RocketChat/Rocket.Chat.ReactNative.svg)](https://david-dm.org/RocketChat/Rocket.Chat.ReactNative)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/bb15e2392a71473ea59d3f634f35c54e)](https://www.codacy.com/app/RocketChat/Rocket.Chat.ReactNative?utm_source=github.com&utm_medium=referral&utm_content=RocketChat/Rocket.Chat.ReactNative&utm_campaign=badger)
**Supported Server Versions:** 0.58.0+ (We are working to support earlier versions)
# Installing Dependencies

View File

@ -23,7 +23,12 @@ const CustomButton = ({ text }) => (
</TouchableOpacity>
);
CustomButton.propTypes = {
text: PropTypes.string
};
Navigation.registerComponent('CustomButton', () => CustomButton);
export default class Cards extends React.PureComponent {
static propTypes = {
data: PropTypes.object.isRequired

View File

@ -1,11 +1,12 @@
export default function throttle(fn, threshhold = 250, scope) {
let last,
deferTimer;
return function() {
let last;
let deferTimer;
return (...args) => {
const context = scope || this;
let now = +new Date(),
args = arguments;
const now = +new Date();
if (last && now < last + threshhold) {
// hold on to it
clearTimeout(deferTimer);

BIN
key.keystore.enc Normal file

Binary file not shown.

View File

@ -1,11 +1,12 @@
{
"name": "rocket-chat-rn",
"name": "rocket-chat-reactnative",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"lint": "eslint .",
"ci": "eslint .",
"ios": "react-native run-ios",
"log-android": "react-native log-android",
"android": "react-native run-android",

View File

@ -1,22 +0,0 @@
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */
import React, { PropTypes } from 'react';
import { TouchableNativeFeedback } from 'react-native';
export default function Button(props) {
return (
<TouchableNativeFeedback onPress={props.onPress}>
{props.children}
</TouchableNativeFeedback>
);
}
Button.defaultProps = {
children: null,
onPress: () => {},
};
Button.propTypes = {
children: PropTypes.node,
onPress: PropTypes.func,
};

View File

@ -1,22 +0,0 @@
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */
import React, { PropTypes } from 'react';
import { TouchableHighlight } from 'react-native';
export default function Button(props) {
return (
<TouchableHighlight onPress={props.onPress}>
{props.children}
</TouchableHighlight>
);
}
Button.defaultProps = {
children: null,
onPress: () => {},
};
Button.propTypes = {
children: PropTypes.node,
onPress: PropTypes.func,
};

View File

@ -1,21 +0,0 @@
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */
import React, { PropTypes } from 'react';
import { View } from 'react-native';
import style from './style';
export default function CenterView(props) {
return (
<View style={style.main}>
{props.children}
</View>
);
}
CenterView.defaultProps = {
children: null,
};
CenterView.propTypes = {
children: PropTypes.node,
};

View File

@ -1,8 +0,0 @@
export default {
main: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
};

View File

@ -1,54 +0,0 @@
/* eslint-disable import/no-extraneous-dependencies, import/no-unresolved, import/extensions */
import React, { PropTypes } from 'react';
import { View, Text, Button } from 'react-native';
export default class Welcome extends React.Component {
styles = {
wrapper: {
flex: 1,
padding: 24,
justifyContent: 'center'
},
header: {
fontSize: 18,
marginBottom: 18
},
content: {
fontSize: 12,
marginBottom: 10,
lineHeight: 18
}
};
showApp(event) {
event.preventDefault();
if (this.props.showApp) { this.props.showApp(); }
}
render() {
return (
<View style={this.styles.wrapper}>
<Text style={this.styles.header}>Welcome to React Native Storybook</Text>
<Text style={this.styles.content}>
This is a UI Component development environment for your React Native app. Here you can
display and interact with your UI components as stories. A story is a single state of one
or more UI components. You can have as many stories as you want. In other words a story is
like a visual test case.
</Text>
<Text style={this.styles.content}>
We have added some stories inside the "storybook/stories" directory for examples. Try
editing the "storybook/stories/Welcome.js" file to edit this message.
</Text>
</View>
);
}
}
Welcome.defaultProps = {
showApp: null
};
Welcome.propTypes = {
showApp: PropTypes.func
};