Commit d2c110b7 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento Committed by GitHub

Ci (#25)

* Init travis configuration

* Try travis

* Try travis

* Try travis

* Try travis

* Try travis

* Try Travis

* Fiz name and add badges
parent f6309601
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
Logo.png

602 KB | W: | H:

Logo.png

260 KB | W: | H:

Logo.png
Logo.png
Logo.png
Logo.png
  • 2-up
  • Swipe
  • Onion skin
# 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
......
......@@ -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
......
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);
......
{
"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",
......
/* 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,
};
/* 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,
};
/* 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,
};
export default {
main: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
};
/* 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
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment