Ci (#25)
* 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:
parent
f630960105
commit
d2c110b7af
|
@ -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
BIN
Logo.png
Binary file not shown.
Before Width: | Height: | Size: 602 KiB After Width: | Height: | Size: 260 KiB |
|
@ -1,5 +1,9 @@
|
||||||
# Rocket.Chat React Native Mobile
|
# 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)
|
**Supported Server Versions:** 0.58.0+ (We are working to support earlier versions)
|
||||||
|
|
||||||
# Installing Dependencies
|
# Installing Dependencies
|
||||||
|
|
|
@ -23,7 +23,12 @@ const CustomButton = ({ text }) => (
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CustomButton.propTypes = {
|
||||||
|
text: PropTypes.string
|
||||||
|
};
|
||||||
|
|
||||||
Navigation.registerComponent('CustomButton', () => CustomButton);
|
Navigation.registerComponent('CustomButton', () => CustomButton);
|
||||||
|
|
||||||
export default class Cards extends React.PureComponent {
|
export default class Cards extends React.PureComponent {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
data: PropTypes.object.isRequired
|
data: PropTypes.object.isRequired
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
export default function throttle(fn, threshhold = 250, scope) {
|
export default function throttle(fn, threshhold = 250, scope) {
|
||||||
let last,
|
let last;
|
||||||
deferTimer;
|
let deferTimer;
|
||||||
return function() {
|
|
||||||
|
return (...args) => {
|
||||||
const context = scope || this;
|
const context = scope || this;
|
||||||
|
|
||||||
let now = +new Date(),
|
const now = +new Date();
|
||||||
args = arguments;
|
|
||||||
if (last && now < last + threshhold) {
|
if (last && now < last + threshhold) {
|
||||||
// hold on to it
|
// hold on to it
|
||||||
clearTimeout(deferTimer);
|
clearTimeout(deferTimer);
|
||||||
|
|
Binary file not shown.
|
@ -1,11 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "rocket-chat-rn",
|
"name": "rocket-chat-reactnative",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node node_modules/react-native/local-cli/cli.js start",
|
"start": "node node_modules/react-native/local-cli/cli.js start",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
|
"ci": "eslint .",
|
||||||
"ios": "react-native run-ios",
|
"ios": "react-native run-ios",
|
||||||
"log-android": "react-native log-android",
|
"log-android": "react-native log-android",
|
||||||
"android": "react-native run-android",
|
"android": "react-native run-android",
|
||||||
|
|
|
@ -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,
|
|
||||||
};
|
|
|
@ -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,
|
|
||||||
};
|
|
|
@ -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,
|
|
||||||
};
|
|
|
@ -1,8 +0,0 @@
|
||||||
export default {
|
|
||||||
main: {
|
|
||||||
flex: 1,
|
|
||||||
justifyContent: 'center',
|
|
||||||
alignItems: 'center',
|
|
||||||
backgroundColor: '#F5FCFF',
|
|
||||||
},
|
|
||||||
};
|
|
|
@ -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
|
|
||||||
};
|
|
Loading…
Reference in New Issue