Skip to content

Commit b30ed4c

Browse files
Hello World App
1 parent d0bff9c commit b30ed4c

Some content is hidden

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

62 files changed

+10295
-0
lines changed

.buckconfig

+6
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

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
# Default - all files
6+
[*]
7+
indent_style = space
8+
indent_size = 4
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true
11+
end_of_line = lf
12+
charset = utf-8
13+
14+
# JavaScript files
15+
[*.{js,ts,tsx}]
16+
indent_size = 2
17+
18+
# JSON
19+
[*.json]
20+
indent_size = 2
21+
insert_final_newline = ignore
22+
23+
# Yaml
24+
[*.{yml,yaml}]
25+
indent_size = 2
26+
27+
# Makefiles
28+
[{Makefile,**.mk}]
29+
indent_style = tab
30+
31+
# Windows files
32+
[*.bat]
33+
end_of_line = crlf

.eslintrc.json

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"extends": [
4+
"eslint:recommended",
5+
"plugin:react/recommended",
6+
"plugin:@typescript-eslint/eslint-recommended",
7+
"plugin:@typescript-eslint/recommended",
8+
"plugin:prettier/recommended",
9+
"plugin:import/typescript",
10+
"prettier"
11+
],
12+
"plugins": [
13+
"react",
14+
"react-native",
15+
"import",
16+
"prettier",
17+
"react-hooks",
18+
"@typescript-eslint",
19+
"shopify-lean"
20+
],
21+
"parserOptions": {
22+
"ecmaVersion": 2019,
23+
"sourceType": "module",
24+
"ecmaFeatures": {
25+
"jsx": true
26+
}
27+
},
28+
"env": {
29+
"jest": true,
30+
"react-native/react-native": true
31+
},
32+
"globals": {
33+
"device": false,
34+
"expect": false,
35+
"waitFor": false,
36+
"element": false,
37+
"by": false
38+
},
39+
"rules": {
40+
"prettier/prettier": "error",
41+
"react/display-name": "off",
42+
"react/prop-types": "off",
43+
"react/jsx-boolean-value": "error",
44+
"react-hooks/rules-of-hooks": "error",
45+
"react-hooks/exhaustive-deps": "warn",
46+
"react-native/no-unused-styles": "error",
47+
"react-native/split-platform-components": "error",
48+
"react-native/no-inline-styles": "off",
49+
"react-native/no-color-literals": "error",
50+
"@typescript-eslint/explicit-function-return-type": "off",
51+
"@typescript-eslint/no-use-before-define": "off",
52+
"@typescript-eslint/no-empty-interface": "off",
53+
"@typescript-eslint/no-explicit-any": "off",
54+
"@typescript-eslint/no-non-null-assertion": "off",
55+
"@typescript-eslint/ban-ts-ignore": "off",
56+
"@typescript-eslint/ban-types": "off",
57+
"@typescript-eslint/explicit-module-boundary-types": "off",
58+
"shopify-lean/typescript/prefer-pascal-case-enums": "error",
59+
"no-param-reassign": "error",
60+
"no-empty": [
61+
"warn",
62+
{
63+
"allowEmptyCatch": true
64+
}
65+
],
66+
"import/newline-after-import": "error",
67+
"import/no-duplicates": "error",
68+
"import/order": [
69+
"error",
70+
{
71+
"groups": [
72+
[
73+
"builtin",
74+
"external"
75+
],
76+
[
77+
"internal",
78+
"parent",
79+
"sibling",
80+
"index",
81+
"unknown"
82+
]
83+
],
84+
"pathGroups": [
85+
{
86+
"pattern": "app/**",
87+
"group": "internal",
88+
"position": "before"
89+
}
90+
],
91+
"pathGroupsExcludedImportTypes": [
92+
"builtin"
93+
],
94+
"alphabetize": {
95+
"order": "asc"
96+
},
97+
"newlines-between": "always"
98+
}
99+
],
100+
"id-length": [
101+
2,
102+
{
103+
"exceptions": [
104+
"t"
105+
]
106+
}
107+
]
108+
},
109+
"settings": {
110+
"react": {
111+
"version": "detect"
112+
}
113+
}
114+
}

.gitattributes

+3
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

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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+
*.hprof
32+
33+
# node.js
34+
#
35+
node_modules/
36+
npm-debug.log
37+
yarn-error.log
38+
39+
# BUCK
40+
buck-out/
41+
\.buckd/
42+
*.keystore
43+
!debug.keystore
44+
45+
# fastlane
46+
#
47+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
48+
# screenshots whenever they are needed.
49+
# For more information about the recommended setup visit:
50+
# https://docs.fastlane.tools/best-practices/source-control/
51+
52+
*/fastlane/report.xml
53+
*/fastlane/Preview.html
54+
*/fastlane/screenshots
55+
56+
# Bundle artifact
57+
*.jsbundle
58+
59+
# CocoaPods
60+
/ios/Pods/

.husky/_/.gitignore

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

.husky/_/husky.sh

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/sh
2+
if [ -z "$husky_skip_init" ]; then
3+
debug () {
4+
if [ "$HUSKY_DEBUG" = "1" ]; then
5+
echo "husky (debug) - $1"
6+
fi
7+
}
8+
9+
readonly hook_name="$(basename "$0")"
10+
debug "starting $hook_name..."
11+
12+
if [ "$HUSKY" = "0" ]; then
13+
debug "HUSKY env variable is set to 0, skipping hook"
14+
exit 0
15+
fi
16+
17+
if [ -f ~/.huskyrc ]; then
18+
debug "sourcing ~/.huskyrc"
19+
. ~/.huskyrc
20+
fi
21+
22+
export readonly husky_skip_init=1
23+
sh -e "$0" "$@"
24+
exitCode="$?"
25+
26+
if [ $exitCode != 0 ]; then
27+
echo "husky - $hook_name hook exited with code $exitCode (error)"
28+
fi
29+
30+
exit $exitCode
31+
fi

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
yarn typescript:check

.watchmanconfig

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

__tests__/App-test.tsx

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

android/app/_BUCK

+55
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.bootcamp",
39+
)
40+
41+
android_resource(
42+
name = "res",
43+
package = "com.bootcamp",
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)