Skip to content

Commit a27feb4

Browse files
Release v.1.0.0
Merge pull request #7 from dooptha/develop
2 parents 4e0c90e + 12e719c commit a27feb4

File tree

255 files changed

+14326
-639
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

255 files changed

+14326
-639
lines changed

.eslintrc.js

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,46 @@
11
module.exports = {
2-
root: true,
3-
extends: '@react-native-community',
4-
};
2+
"extends": "airbnb",
3+
"parser": "babel-eslint",
4+
"env": {
5+
"browser": true,
6+
"node": true,
7+
"es6": true,
8+
"mocha": true
9+
},
10+
"plugins": ["jest"],
11+
"rules": {
12+
// "valid-jsdoc": ["error", {
13+
// "requireReturn": true,
14+
// "requireReturnType": true,
15+
// "requireParamDescription": true,
16+
// "requireReturnDescription": true
17+
// }],
18+
// "require-jsdoc": ["error", {
19+
// "require": {
20+
// "FunctionDeclaration": true,
21+
// "MethodDefinition": true,
22+
// "ClassDeclaration": true
23+
// }
24+
// }],
25+
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
26+
"react/forbid-prop-types": [1, { "forbid": ["any"] }],
27+
"react/prop-types": [0],
28+
"arrow-parens": [2, "always"],
29+
"class-methods-use-this": [0],
30+
"no-underscore-dangle": ["error", { "allow": ["_id", "_navigator"] }]
31+
},
32+
"env": {
33+
"jest/globals": true
34+
},
35+
"overrides": [
36+
{
37+
"files": ["*.test.js", "tests/setup.js"],
38+
"rules": {
39+
"no-console": "off",
40+
"one-var": "off",
41+
"one-var-declaration-per-line": "off",
42+
"import/no-named-as-default-member": "off"
43+
}
44+
}
45+
],
46+
}

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[BUG]"
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Smartphone (please complete the following information):**
27+
- Device: [e.g. iPhone6]
28+
- OS: [e.g. iOS8.1]
29+
- Browser [e.g. stock browser, safari]
30+
- Version [e.g. 22]
31+
32+
**Additional context**
33+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.gitignore

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,22 @@ project.xcworkspace
2424

2525
# Android/IntelliJ
2626
#
27-
build/
2827
.idea
2928
.gradle
3029
local.properties
3130
*.iml
31+
debug.log
32+
my-upload-key.keystore
33+
Task
34+
Configure
35+
3236

3337
# node.js
3438
#
3539
node_modules/
3640
npm-debug.log
3741
yarn-error.log
42+
coverage/
3843

3944
# BUCK
4045
buck-out/
@@ -57,3 +62,9 @@ buck-out/
5762

5863
# CocoaPods
5964
/ios/Pods/
65+
66+
# Project config override
67+
config/override.js
68+
69+
# Environment variables
70+
.env

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
sudo: false
2+
language: node_js
3+
node_js:
4+
- "11"
5+
addons:
6+
chrome: stable
7+
cache:
8+
directories:
9+
- node_modules
10+
before_script:
11+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
12+
- chmod +x ./cc-test-reporter
13+
- ./cc-test-reporter before-build
14+
script:
15+
- npm test
16+
after_script:
17+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT --id $CODE_CLIMAT_TOKEN
18+
notifications:
19+
email: false

App.js

Lines changed: 40 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,48 @@
1-
/**
2-
* Sample React Native App
3-
* https://github.com/facebook/react-native
4-
*
5-
* @format
6-
* @flow
7-
*/
1+
import React from 'react';
2+
import { YellowBox } from 'react-native';
3+
import { mapping } from '@eva-design/eva';
4+
import { ApplicationProvider } from 'react-native-ui-kitten';
5+
import { DynamicStatusBar } from './src/components/common';
6+
import Router from './src/navigation/routes';
7+
import { themes, customMapping } from './src/utils/themes';
8+
import { GlobalState, useGlobalState } from './src/utils/context';
9+
import NavigationService from './src/navigation/NavigationService';
10+
import { setupExceptionHandlers } from './src/utils/errors';
811

9-
import React, {Fragment} from 'react';
10-
import {
11-
SafeAreaView,
12-
StyleSheet,
13-
ScrollView,
14-
View,
15-
Text,
16-
StatusBar,
17-
} from 'react-native';
12+
// import whyDidYouRender from '@welldone-software/why-did-you-render';
13+
// if (__DEV__) {
14+
// whyDidYouRender(React);
15+
// }
16+
//
17+
//
1818

19-
import {
20-
Header,
21-
LearnMoreLinks,
22-
Colors,
23-
DebugInstructions,
24-
ReloadInstructions,
25-
} from 'react-native/Libraries/NewAppScreen';
19+
YellowBox.ignoreWarnings([
20+
'Unrecognized WebSocket connection option(s) `agent`, `perMessageDeflate`, `pfx`, `key`, `passphrase`, `cert`, `ca`, `ciphers`, `rejectUnauthorized`. Did you mean to put these under `headers`?',
21+
]);
22+
23+
setupExceptionHandlers();
2624

2725
const App = () => {
26+
const [{ app }] = useGlobalState();
27+
2828
return (
29-
<Fragment>
30-
<StatusBar barStyle="dark-content" />
31-
<SafeAreaView>
32-
<ScrollView
33-
contentInsetAdjustmentBehavior="automatic"
34-
style={styles.scrollView}>
35-
<Header />
36-
<View style={styles.body}>
37-
<View style={styles.sectionContainer}>
38-
<Text style={styles.sectionTitle}>Step One</Text>
39-
<Text style={styles.sectionDescription}>
40-
Edit <Text style={styles.highlight}>App.js</Text> to change this
41-
screen and then come back to see your edits.
42-
</Text>
43-
</View>
44-
<View style={styles.sectionContainer}>
45-
<Text style={styles.sectionTitle}>See Your Changes</Text>
46-
<Text style={styles.sectionDescription}>
47-
<ReloadInstructions />
48-
</Text>
49-
</View>
50-
<View style={styles.sectionContainer}>
51-
<Text style={styles.sectionTitle}>Debug</Text>
52-
<Text style={styles.sectionDescription}>
53-
<DebugInstructions />
54-
</Text>
55-
</View>
56-
<View style={styles.sectionContainer}>
57-
<Text style={styles.sectionTitle}>Learn More</Text>
58-
<Text style={styles.sectionDescription}>
59-
Read the docs to discover what to do next:
60-
</Text>
61-
</View>
62-
<LearnMoreLinks />
63-
</View>
64-
</ScrollView>
65-
</SafeAreaView>
66-
</Fragment>
29+
<ApplicationProvider
30+
mapping={mapping}
31+
customMapping={customMapping}
32+
theme={themes[app.properties.theme]}
33+
>
34+
<DynamicStatusBar currentTheme={app.properties.theme} />
35+
<Router
36+
ref={
37+
(navigatorRef) => NavigationService.setTopLevelNavigator(navigatorRef)
38+
}
39+
/>
40+
</ApplicationProvider>
6741
);
6842
};
6943

70-
const styles = StyleSheet.create({
71-
scrollView: {
72-
backgroundColor: Colors.lighter,
73-
},
74-
body: {
75-
backgroundColor: Colors.white,
76-
},
77-
sectionContainer: {
78-
marginTop: 32,
79-
paddingHorizontal: 24,
80-
},
81-
sectionTitle: {
82-
fontSize: 24,
83-
fontWeight: '600',
84-
color: Colors.black,
85-
},
86-
sectionDescription: {
87-
marginTop: 8,
88-
fontSize: 18,
89-
fontWeight: '400',
90-
color: Colors.dark,
91-
},
92-
highlight: {
93-
fontWeight: '700',
94-
},
95-
});
96-
97-
export default App;
44+
export default () => (
45+
<GlobalState>
46+
<App />
47+
</GlobalState>
48+
);

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at dooptha@gmail.com. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

CONTRIBUTING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Contributing
2+
3+
When contributing to this repository, please first discuss the change you wish to make via issue,
4+
email, or any other method with the owners of this repository before making a change.
5+
6+
Please note we have a code of conduct, please follow it in all your interactions with the project.
7+
8+
## Pull Request Process
9+
10+
1. Ensure any install or build dependencies are removed before the end of the layer when doing a
11+
build.
12+
2. Update the README.md with details of changes to the interface, this includes new environment
13+
variables, exposed ports, useful file locations and container parameters.
14+
3. Increase the version numbers in any examples files and the README.md to the new version that this
15+
Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
16+
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
17+
do not have permission to do that, you may request the second reviewer to merge it for you.

0 commit comments

Comments
 (0)