Skip to content

Commit 0f3c52c

Browse files
committed
Initial Commit
0 parents  commit 0f3c52c

File tree

33,220 files changed

+6227238
-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.

33,220 files changed

+6227238
-0
lines changed

.buckconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
[android]
3+
target = Google Inc.:Google APIs:23
4+
5+
[maven_repositories]
6+
central = https://repo1.maven.org/maven2

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Windows files
2+
[*.bat]
3+
end_of_line = crlf

.flowconfig

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
[ignore]
2+
; We fork some components by platform
3+
.*/*[.]android.js
4+
5+
; Ignore "BUCK" generated dirs
6+
<PROJECT_ROOT>/\.buckd/
7+
8+
; Ignore polyfills
9+
node_modules/react-native/Libraries/polyfills/.*
10+
11+
; Flow doesn't support platforms
12+
.*/Libraries/Utilities/LoadingView.js
13+
14+
[untyped]
15+
.*/node_modules/@react-native-community/cli/.*/.*
16+
17+
[include]
18+
19+
[libs]
20+
node_modules/react-native/interface.js
21+
node_modules/react-native/flow/
22+
23+
[options]
24+
emoji=true
25+
26+
exact_by_default=true
27+
28+
module.file_ext=.js
29+
module.file_ext=.json
30+
module.file_ext=.ios.js
31+
32+
munge_underscores=true
33+
34+
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
35+
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\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
36+
37+
suppress_type=$FlowIssue
38+
suppress_type=$FlowFixMe
39+
suppress_type=$FlowFixMeProps
40+
suppress_type=$FlowFixMeState
41+
42+
[lints]
43+
sketchy-null-number=warn
44+
sketchy-null-mixed=warn
45+
sketchy-number=warn
46+
untyped-type-import=warn
47+
nonstrict-import=warn
48+
deprecated-type=warn
49+
unsafe-getters-setters=warn
50+
unnecessary-invariant=warn
51+
signature-verification-failure=warn
52+
53+
[strict]
54+
deprecated-type
55+
nonstrict-import
56+
sketchy-null
57+
unclear-type
58+
unsafe-getters-setters
59+
untyped-import
60+
untyped-type-import
61+
62+
[version]
63+
^0.149.0

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Windows files should use crlf line endings
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
*.bat text eol=crlf

.gitignore

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
24+
# Android/IntelliJ
25+
#
26+
build/
27+
.idea
28+
.gradle
29+
local.properties
30+
*.iml
31+
32+
# node.js
33+
#
34+
npm-debug.log
35+
yarn-error.log
36+
./node_modules
37+
38+
# BUCK
39+
buck-out/
40+
\.buckd/
41+
*.keystore
42+
!debug.keystore
43+
44+
# fastlane
45+
#
46+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
47+
# screenshots whenever they are needed.
48+
# For more information about the recommended setup visit:
49+
# https://docs.fastlane.tools/best-practices/source-control/
50+
51+
*/fastlane/report.xml
52+
*/fastlane/Preview.html
53+
*/fastlane/screenshots
54+
55+
# Bundle artifact
56+
*.jsbundle

.prettierrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
semi: false,
3+
bracketSpacing: false,
4+
singleQuote: true,
5+
jsxSingleQuote: true,
6+
printWidth: 120
7+
};

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"git.ignoreLimitWarning": true
3+
}

.watchmanconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

App.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import React from 'react'
2+
import {
3+
SafeAreaView,
4+
StatusBar,
5+
StyleSheet,
6+
useColorScheme
7+
} from 'react-native'
8+
import { NavigationContainer } from '@react-navigation/native'
9+
import { createStackNavigator } from '@react-navigation/stack'
10+
import Inbox from './Inbox'
11+
12+
const Stack = createStackNavigator()
13+
14+
const App = () => {
15+
const isDarkMode = useColorScheme() === 'dark'
16+
return (
17+
<SafeAreaView style={styles.app}>
18+
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
19+
<NavigationContainer>
20+
<Stack.Navigator>
21+
<Stack.Screen name='Inbox' component={Inbox} />
22+
</Stack.Navigator>
23+
</NavigationContainer>
24+
</SafeAreaView>
25+
)
26+
}
27+
28+
const styles = StyleSheet.create({
29+
app: {
30+
backgroundColor: 'white',
31+
height: '100%'
32+
}
33+
})
34+
35+
export default App

Inbox.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import React from 'react'
2+
import { StyleSheet, View, Text } from 'react-native'
3+
4+
const Inbox = ({ navigation }) => {
5+
return (
6+
<View style={styles.container}>
7+
<Text style={styles.header}>Hello!</Text>
8+
<Text style={styles.text}>This is where we start</Text>
9+
</View>
10+
)
11+
}
12+
13+
const styles = StyleSheet.create({
14+
app: {
15+
backgroundColor: 'white',
16+
height: '100%'
17+
},
18+
container: {
19+
flexGrow: 1,
20+
justifyContent: 'center'
21+
},
22+
header: {
23+
fontSize: 32,
24+
textAlign: 'center'
25+
},
26+
text: {
27+
textAlign: 'center'
28+
}
29+
})
30+
31+
export default Inbox

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Kenect React Native Programming Exercise
2+
Please clone this repository and complete the following steps ensure that the application runs locally before the technical interview begins.
3+
4+
## Dependencies
5+
- node & npm: `brew install node`
6+
- cocoapods: `sudo gem install cocoapods`
7+
8+
## Get started
9+
Due to how `@react-native-community/cli` and its dependents are structured, we cannot include `node_modules` within the repository and they need to be installed for each clone of this repository.
10+
11+
### Install Node modules
12+
`npm install`
13+
14+
### Ensure Pods are up to date
15+
`cd ios && pod install`
16+
17+
### Run the application
18+
`npm run ios`

__tests__/App-test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* @format
3+
*/
4+
5+
import 'react-native'
6+
import React from 'react'
7+
import App from '../App'
8+
9+
// Note: test renderer must be required after react-native.
10+
import renderer from 'react-test-renderer'
11+
12+
it('renders correctly', () => {
13+
renderer.create(<App />)
14+
})

android/app/_BUCK

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# To learn about Buck see [Docs](https://buckbuild.com/).
2+
# To run your application with Buck:
3+
# - install Buck
4+
# - `npm start` - to start the packager
5+
# - `cd android`
6+
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
7+
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
8+
# - `buck install -r android/app` - compile, install and run application
9+
#
10+
11+
load(":build_defs.bzl", "create_aar_targets", "create_jar_targets")
12+
13+
lib_deps = []
14+
15+
create_aar_targets(glob(["libs/*.aar"]))
16+
17+
create_jar_targets(glob(["libs/*.jar"]))
18+
19+
android_library(
20+
name = "all-libs",
21+
exported_deps = lib_deps,
22+
)
23+
24+
android_library(
25+
name = "app-code",
26+
srcs = glob([
27+
"src/main/java/**/*.java",
28+
]),
29+
deps = [
30+
":all-libs",
31+
":build_config",
32+
":res",
33+
],
34+
)
35+
36+
android_build_config(
37+
name = "build_config",
38+
package = "com.reactnativeexercise",
39+
)
40+
41+
android_resource(
42+
name = "res",
43+
package = "com.reactnativeexercise",
44+
res = "src/main/res",
45+
)
46+
47+
android_binary(
48+
name = "app",
49+
keystore = "//android/keystores:debug",
50+
manifest = "src/main/AndroidManifest.xml",
51+
package_type = "debug",
52+
deps = [
53+
":app-code",
54+
],
55+
)

0 commit comments

Comments
 (0)