Skip to content

Commit 0922492

Browse files
committed
Batman! (this commit has no parents)
0 parents  commit 0922492

Some content is hidden

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

64 files changed

+2790
-0
lines changed

.gitignore

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Built application files
2+
template/android/*/build/
3+
4+
# Crashlytics configuations
5+
template/android/com_crashlytics_export_strings.xml
6+
7+
# Local configuration file (sdk path, etc)
8+
template/android/local.properties
9+
10+
# Gradle generated files
11+
template/android/.gradle/
12+
13+
# Signing files
14+
template/android/.signing/
15+
16+
# User-specific configurations
17+
template/android/.idea/gradle.xml
18+
template/android/.idea/libraries/
19+
template/android/.idea/workspace.xml
20+
template/android/.idea/tasks.xml
21+
template/android/.idea/.name
22+
template/android/.idea/compiler.xml
23+
template/android/.idea/copyright/profiles_settings.xml
24+
template/android/.idea/encodings.xml
25+
template/android/.idea/misc.xml
26+
template/android/.idea/modules.xml
27+
template/android/.idea/scopes/scope_settings.xml
28+
template/android/.idea/vcs.xml
29+
template/android/*.iml
30+
31+
# Xcode
32+
*.pbxuser
33+
*.mode1v3
34+
*.mode2v3
35+
*.perspectivev3
36+
*.xcuserstate
37+
template/ios/Pods
38+
template/ios/build
39+
*project.xcworkspace*
40+
*xcuserdata*
41+
42+
# OS-specific files
43+
.DS_Store
44+
.DS_Store?
45+
._*
46+
.Spotlight-V100
47+
.Trashes
48+
ehthumbs.db
49+
Thumbs.db
50+
51+
# Android
52+
template/android/build
53+
template/android/.settings
54+
55+
.idea
56+
yarn.lock
57+
.github
58+
.vscode
59+
.nyc_output
60+
*.coverage.json
61+
.circleci
62+
.eslintignore

.npmignore

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Built application files
2+
template/android/*/build/
3+
4+
# Crashlytics configuations
5+
template/android/com_crashlytics_export_strings.xml
6+
7+
# Local configuration file (sdk path, etc)
8+
template/android/local.properties
9+
10+
# Gradle generated files
11+
template/android/.gradle/
12+
13+
# Signing files
14+
template/android/.signing/
15+
16+
# User-specific configurations
17+
template/android/.idea/gradle.xml
18+
template/android/.idea/libraries/
19+
template/android/.idea/workspace.xml
20+
template/android/.idea/tasks.xml
21+
template/android/.idea/.name
22+
template/android/.idea/compiler.xml
23+
template/android/.idea/copyright/profiles_settings.xml
24+
template/android/.idea/encodings.xml
25+
template/android/.idea/misc.xml
26+
template/android/.idea/modules.xml
27+
template/android/.idea/scopes/scope_settings.xml
28+
template/android/.idea/vcs.xml
29+
template/android/*.iml
30+
31+
# Xcode
32+
*.pbxuser
33+
*.mode1v3
34+
*.mode2v3
35+
*.perspectivev3
36+
*.xcuserstate
37+
template/ios/Pods
38+
template/ios/build
39+
*project.xcworkspace*
40+
*xcuserdata*
41+
42+
# OS-specific files
43+
.DS_Store
44+
.DS_Store?
45+
._*
46+
.Spotlight-V100
47+
.Trashes
48+
ehthumbs.db
49+
Thumbs.db
50+
51+
# Android
52+
template/android/build
53+
template/android/.settings
54+
55+
# Node
56+
template/node_modules
57+
58+
.idea
59+
yarn.lock
60+
.github
61+
.vscode
62+
.nyc_output
63+
*.coverage.json
64+
.circleci
65+
.eslintignore

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Contributing
2+
3+
Contributing to this project should be as easy and transparent as possible.
4+
5+
## License
6+
7+
By contributing, you agree that your contributions will be licensed under the [MIT License](LICENSE).

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Ivan Boldyrev
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# :flexed-biceps: React Native Airbnb Template
2+
3+
> Clean and minimalist React Native template for a quick start.
4+
5+
## :star: Features
6+
7+
- Elegant usage directly within the [React Native CLI](https://github.com/react-native-community/cli)
8+
- Consistent with the default React Native template
9+
- Minimal additional dependencies
10+
11+
## :arrow_forward: Usage
12+
13+
```sh
14+
react-native init MyApp --template airbnb
15+
```
16+
17+
## :computer: Contributing
18+
19+
Contributions are very welcome. Please check out the [contributing document](CONTRIBUTING.md).
20+
21+
## :bookmark: License
22+
23+
This project is [MIT](LICENSE) licensed.

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "react-native-template-airbnb",
3+
"version": "0.0.1",
4+
"description": "React Native Airbnb - Template",
5+
"keywords": [
6+
"react",
7+
"react-native",
8+
"cli",
9+
"template",
10+
"airbnb"
11+
],
12+
"main": "template.config.js",
13+
"author": "Ivan Boldyrev <iboldurev@gmail.com>",
14+
"license": "MIT"
15+
}

template.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
placeholderName: 'HelloWorld',
3+
templateDir: './template',
4+
}

template/App.js

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
/**
2+
* Sample React Native App
3+
* https://github.com/facebook/react-native
4+
*
5+
* @format
6+
* @flow
7+
*/
8+
9+
import React, { Fragment } from 'react'
10+
import {
11+
SafeAreaView,
12+
StyleSheet,
13+
ScrollView,
14+
View,
15+
Text,
16+
StatusBar,
17+
} from 'react-native'
18+
19+
import {
20+
Header,
21+
LearnMoreLinks,
22+
Colors,
23+
DebugInstructions,
24+
ReloadInstructions,
25+
} from 'react-native/Libraries/NewAppScreen'
26+
27+
const App = () => {
28+
return (
29+
<Fragment>
30+
<StatusBar barStyle="dark-content" />
31+
<SafeAreaView>
32+
<ScrollView
33+
contentInsetAdjustmentBehavior="automatic"
34+
style={styles.scrollView}
35+
>
36+
<Text>Demo Airbnb</Text>
37+
{global.HermesInternal == null ? null : (
38+
<View style={styles.engine}>
39+
<Text style={styles.footer}>Engine: Hermes</Text>
40+
</View>
41+
)}
42+
<View style={styles.body}>
43+
<View style={styles.sectionContainer}>
44+
<Text style={styles.sectionTitle}>Step One</Text>
45+
<Text style={styles.sectionDescription}>
46+
Edit <Text style={styles.highlight}>App.js</Text> to change this
47+
screen and then come back to see your edits.
48+
</Text>
49+
</View>
50+
<View style={styles.sectionContainer}>
51+
<Text style={styles.sectionTitle}>See Your Changes</Text>
52+
<Text style={styles.sectionDescription}>
53+
<ReloadInstructions />
54+
</Text>
55+
</View>
56+
<View style={styles.sectionContainer}>
57+
<Text style={styles.sectionTitle}>Debug</Text>
58+
<Text style={styles.sectionDescription}>
59+
<DebugInstructions />
60+
</Text>
61+
</View>
62+
<View style={styles.sectionContainer}>
63+
<Text style={styles.sectionTitle}>Learn More</Text>
64+
<Text style={styles.sectionDescription}>
65+
Read the docs to discover what to do next:
66+
</Text>
67+
</View>
68+
<LearnMoreLinks />
69+
</View>
70+
</ScrollView>
71+
</SafeAreaView>
72+
</Fragment>
73+
)
74+
}
75+
76+
const styles = StyleSheet.create({
77+
scrollView: {
78+
backgroundColor: Colors.lighter,
79+
},
80+
engine: {
81+
position: 'absolute',
82+
right: 0,
83+
},
84+
body: {
85+
backgroundColor: Colors.white,
86+
},
87+
sectionContainer: {
88+
marginTop: 32,
89+
paddingHorizontal: 24,
90+
},
91+
sectionTitle: {
92+
fontSize: 24,
93+
fontWeight: '600',
94+
color: Colors.black,
95+
},
96+
sectionDescription: {
97+
marginTop: 8,
98+
fontSize: 18,
99+
fontWeight: '400',
100+
color: Colors.dark,
101+
},
102+
highlight: {
103+
fontWeight: '700',
104+
},
105+
footer: {
106+
color: Colors.dark,
107+
fontSize: 12,
108+
fontWeight: '600',
109+
padding: 4,
110+
paddingRight: 12,
111+
textAlign: 'right',
112+
},
113+
})
114+
115+
export default App

template/__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+
});

template/_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

template/_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+
};

0 commit comments

Comments
 (0)