Skip to content

Commit 2de28ee

Browse files
committed
Initial public import
0 parents  commit 2de28ee

File tree

471 files changed

+9895
-0
lines changed

Some content is hidden

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

471 files changed

+9895
-0
lines changed

.babelrc

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"presets": ["babel-preset-expo"],
3+
"env": {
4+
"development": {
5+
"plugins": ["transform-react-jsx-source"]
6+
}
7+
},
8+
"plugins": [
9+
[
10+
"module-resolver",
11+
{
12+
"alias": {
13+
"@volt": "./src",
14+
"@volt-assets": "./assets"
15+
}
16+
}
17+
]
18+
]
19+
}

.eslintrc.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
extends: 'universe/native',
3+
4+
globals: {
5+
Expo: false,
6+
},
7+
8+
rules: {
9+
'react/require-default-props': 'error',
10+
'react/sort-prop-types': 'error',
11+
'react/no-did-mount-set-state': 'off',
12+
'react/no-did-update-set-state': 'off',
13+
},
14+
};

.flowconfig

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
[ignore]
2+
; We fork some components by platform
3+
.*/*[.]android.js
4+
5+
; Ignore templates for 'react-native init'
6+
<PROJECT_ROOT>/node_modules/react-native/local-cli/templates/.*
7+
8+
; Ignore RN jest
9+
<PROJECT_ROOT>/node_modules/react-native/jest/.*
10+
11+
; Ignore RNTester
12+
<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
13+
14+
; Ignore the website subdir
15+
<PROJECT_ROOT>/node_modules/react-native/website/.*
16+
17+
; Ignore the Dangerfile
18+
<PROJECT_ROOT>/node_modules/react-native/danger/dangerfile.js
19+
20+
; Ignore Fbemitter
21+
<PROJECT_ROOT>/node_modules/fbemitter/.*
22+
23+
; Ignore "BUCK" generated dirs
24+
<PROJECT_ROOT>/node_modules/react-native/\.buckd/
25+
26+
; Ignore unexpected extra "@providesModule"
27+
.*/node_modules/.*/node_modules/fbjs/.*
28+
29+
; Ignore polyfills
30+
<PROJECT_ROOT>/node_modules/react-native/Libraries/polyfills/.*
31+
32+
; Ignore various node_modules
33+
<PROJECT_ROOT>/node_modules/react-native-gesture-handler/.*
34+
<PROJECT_ROOT>/node_modules/expo/.*
35+
<PROJECT_ROOT>/node_modules/react-navigation/.*
36+
<PROJECT_ROOT>/node_modules/xdl/.*
37+
<PROJECT_ROOT>/node_modules/reqwest/.*
38+
<PROJECT_ROOT>/node_modules/metro-bundler/.*
39+
40+
[include]
41+
42+
[libs]
43+
node_modules/react-native/Libraries/react-native/react-native-interface.js
44+
node_modules/react-native/flow/
45+
node_modules/expo/flow/
46+
47+
[options]
48+
emoji=true
49+
50+
module.system=haste
51+
52+
module.file_ext=.js
53+
module.file_ext=.jsx
54+
module.file_ext=.json
55+
module.file_ext=.ios.js
56+
57+
munge_underscores=true
58+
59+
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'
60+
61+
suppress_type=$FlowIssue
62+
suppress_type=$FlowFixMe
63+
suppress_type=$FlowFixMeProps
64+
suppress_type=$FlowFixMeState
65+
suppress_type=$FixMe
66+
67+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)
68+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+
69+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
70+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
71+
72+
unsafe.enable_getters_and_setters=true
73+
74+
[version]
75+
^0.56.0

.gitignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# expo
4+
.expo/
5+
6+
# dependencies
7+
/node_modules
8+
9+
# misc
10+
.env.local
11+
.env.development.local
12+
.env.test.local
13+
.env.production.local
14+
15+
npm-debug.log*
16+
yarn-debug.log*
17+
yarn-error.log*

.node-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9.7.1

.prettierrc.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
useTabs: false,
3+
tabWidth: 2,
4+
singleQuote: true,
5+
trailingComma: 'es5',
6+
};

.watchmanconfig

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

App.js

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import '@volt/initializers';
2+
3+
import React, { PureComponent } from 'react';
4+
import { StatusBar, View } from 'react-native';
5+
import { AppLoading, Asset, Font, KeepAwake } from 'expo';
6+
import { MaterialCommunityIcons } from '@expo/vector-icons';
7+
import { Provider } from 'react-redux';
8+
import chakraImages from '@volt-assets/images/chakra';
9+
import icons from '@volt-assets/images/icons';
10+
import store from '@volt/store';
11+
import Body from '@volt/app/Body';
12+
13+
export default class extends PureComponent {
14+
state = {
15+
assetsLoaded: false,
16+
};
17+
18+
async componentDidMount() {
19+
await this.loadAssets();
20+
this.setState({ assetsLoaded: true });
21+
}
22+
23+
render() {
24+
if (!this.state.assetsLoaded) {
25+
return <AppLoading />;
26+
}
27+
28+
return (
29+
<Provider store={store}>
30+
<View>
31+
<StatusBar hidden />
32+
<KeepAwake />
33+
<Body />
34+
</View>
35+
</Provider>
36+
);
37+
}
38+
39+
loadAssets() {
40+
// TODO: review if only this used
41+
const vectorIconsLoader = Font.loadAsync(MaterialCommunityIcons.font);
42+
43+
const customFontsLoader = Font.loadAsync({
44+
Fibre: require('@volt-assets/fonts/Fibre.otf'),
45+
// TODO: review if all used
46+
SourceCodePro: require('@volt-assets/fonts/Source_Code_Pro/SourceCodePro-Regular.ttf'),
47+
SourceCodeProLight: require('@volt-assets/fonts/Source_Code_Pro/SourceCodePro-Light.ttf'),
48+
SourceCodeProMedium: require('@volt-assets/fonts/Source_Code_Pro/SourceCodePro-Medium.ttf'),
49+
SourceCodeProSemiBold: require('@volt-assets/fonts/Source_Code_Pro/SourceCodePro-Semibold.ttf'),
50+
});
51+
52+
// TODO: review if all images imported
53+
const imagesLoader = Asset.loadAsync([...Object.values(icons), ...Object.values(chakraImages)]);
54+
55+
return Promise.all([vectorIconsLoader, customFontsLoader, imagesLoader]);
56+
}
57+
}

0 commit comments

Comments
 (0)