Skip to content

Commit 9474c35

Browse files
committed
Init 🚀
0 parents  commit 9474c35

File tree

82 files changed

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

82 files changed

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

‎.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native-community',
4+
};

‎.flowconfig

Lines changed: 75 additions & 0 deletions
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 "BUCK" generated dirs
6+
<PROJECT_ROOT>/\.buckd/
7+
8+
; Ignore polyfills
9+
node_modules/react-native/Libraries/polyfills/.*
10+
11+
; These should not be required directly
12+
; require from fbjs/lib instead: require('fbjs/lib/warning')
13+
node_modules/warning/.*
14+
15+
; Flow doesn't support platforms
16+
.*/Libraries/Utilities/LoadingView.js
17+
18+
[untyped]
19+
.*/node_modules/@react-native-community/cli/.*/.*
20+
21+
[include]
22+
23+
[libs]
24+
node_modules/react-native/Libraries/react-native/react-native-interface.js
25+
node_modules/react-native/flow/
26+
27+
[options]
28+
emoji=true
29+
30+
esproposal.optional_chaining=enable
31+
esproposal.nullish_coalescing=enable
32+
33+
module.file_ext=.js
34+
module.file_ext=.json
35+
module.file_ext=.ios.js
36+
37+
munge_underscores=true
38+
39+
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation'
40+
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
41+
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'
42+
43+
suppress_type=$FlowIssue
44+
suppress_type=$FlowFixMe
45+
suppress_type=$FlowFixMeProps
46+
suppress_type=$FlowFixMeState
47+
48+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
49+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
50+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
51+
52+
[lints]
53+
sketchy-null-number=warn
54+
sketchy-null-mixed=warn
55+
sketchy-number=warn
56+
untyped-type-import=warn
57+
nonstrict-import=warn
58+
deprecated-type=warn
59+
unsafe-getters-setters=warn
60+
inexact-spread=warn
61+
unnecessary-invariant=warn
62+
signature-verification-failure=warn
63+
deprecated-utility=error
64+
65+
[strict]
66+
deprecated-type
67+
nonstrict-import
68+
sketchy-null
69+
unclear-type
70+
unsafe-getters-setters
71+
untyped-import
72+
untyped-type-import
73+
74+
[version]
75+
^0.105.0

‎.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pbxproj -text

‎.gitignore

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
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+
node_modules/
35+
npm-debug.log
36+
yarn-error.log
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
57+
58+
# CocoaPods
59+
/ios/Pods/
60+
# Logs
61+
logs
62+
*.log
63+
npm-debug.log*
64+
yarn-debug.log*
65+
yarn-error.log*
66+
lerna-debug.log*
67+
68+
# Diagnostic reports (https://nodejs.org/api/report.html)
69+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
70+
71+
# Runtime data
72+
pids
73+
*.pid
74+
*.seed
75+
*.pid.lock
76+
77+
# Directory for instrumented libs generated by jscoverage/JSCover
78+
lib-cov
79+
80+
# Coverage directory used by tools like istanbul
81+
coverage
82+
*.lcov
83+
84+
# nyc test coverage
85+
.nyc_output
86+
87+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
88+
.grunt
89+
90+
# Bower dependency directory (https://bower.io/)
91+
bower_components
92+
93+
# node-waf configuration
94+
.lock-wscript
95+
96+
# Compiled binary addons (https://nodejs.org/api/addons.html)
97+
build/Release
98+
99+
# Dependency directories
100+
node_modules/
101+
jspm_packages/
102+
103+
# TypeScript v1 declaration files
104+
typings/
105+
106+
# TypeScript cache
107+
*.tsbuildinfo
108+
109+
# Optional npm cache directory
110+
.npm
111+
112+
# Optional eslint cache
113+
.eslintcache
114+
115+
# Microbundle cache
116+
.rpt2_cache/
117+
.rts2_cache_cjs/
118+
.rts2_cache_es/
119+
.rts2_cache_umd/
120+
121+
# Optional REPL history
122+
.node_repl_history
123+
124+
# Output of 'npm pack'
125+
*.tgz
126+
127+
# Yarn Integrity file
128+
.yarn-integrity
129+
130+
# dotenv environment variables file
131+
.env
132+
.env.test
133+
134+
# parcel-bundler cache (https://parceljs.org/)
135+
.cache
136+
137+
# Next.js build output
138+
.next
139+
140+
# Nuxt.js build / generate output
141+
.nuxt
142+
dist
143+
144+
# Gatsby files
145+
.cache/
146+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
147+
# https://nextjs.org/blog/next-9-1#public-directory-support
148+
# public
149+
150+
# vuepress build output
151+
.vuepress/dist
152+
153+
# Serverless directories
154+
.serverless/
155+
156+
# FuseBox cache
157+
.fusebox/
158+
159+
# DynamoDB Local files
160+
.dynamodb/
161+
162+
# TernJS port file
163+
.tern-port
164+
165+
blog/

‎.prettierrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
bracketSpacing: false,
3+
jsxBracketSameLine: true,
4+
singleQuote: true,
5+
trailingComma: 'all',
6+
};

‎.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"workbench.colorTheme": "Plastic"
3+
}

‎.watchmanconfig

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

‎App.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import {ApolloProvider} from '@apollo/react-hooks';
2+
import ApolloClient from 'apollo-boost';
3+
import React from 'react';
4+
import {SafeAreaView, StatusBar, StyleSheet, Text} from 'react-native';
5+
import {CreateQuote} from './components/CreateQuote';
6+
import {ListQuotes} from './components/ListQuotes';
7+
8+
const client = new ApolloClient({
9+
uri: 'http://localhost:4000/',
10+
});
11+
12+
const App = () => {
13+
return (
14+
<>
15+
<StatusBar barStyle="dark-content" />
16+
<ApolloProvider client={client}>
17+
<SafeAreaView>
18+
<Text style={styles.text}>Programming Quotes</Text>
19+
<CreateQuote />
20+
<ListQuotes />
21+
</SafeAreaView>
22+
</ApolloProvider>
23+
</>
24+
);
25+
};
26+
27+
const styles = StyleSheet.create({
28+
text: {
29+
fontSize: 16,
30+
margin: 10,
31+
},
32+
});
33+
34+
export default App;

‎README.md

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

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