This repository has been archived by the owner on Mar 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7a9df8e
Showing
46 changed files
with
7,838 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"presets": [ | ||
"babel-preset-react-native-stage-0/decorator-support" | ||
], | ||
"env": { | ||
"development": { | ||
"plugins": [ | ||
"transform-react-jsx-source" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
[ignore] | ||
; We fork some components by platform | ||
.*/*[.]android.js | ||
|
||
; Ignore "BUCK" generated dirs | ||
<PROJECT_ROOT>/\.buckd/ | ||
|
||
; Ignore unexpected extra "@providesModule" | ||
.*/node_modules/.*/node_modules/fbjs/.* | ||
|
||
; Ignore duplicate module providers | ||
; For RN Apps installed via npm, "Libraries" folder is inside | ||
; "node_modules/react-native" but in the source repo it is in the root | ||
.*/Libraries/react-native/React.js | ||
.*/Libraries/react-native/ReactNative.js | ||
|
||
; Additional create-react-native-app ignores | ||
|
||
; Ignore duplicate module providers | ||
.*/node_modules/fbemitter/lib/* | ||
|
||
; Ignore misbehaving dev-dependencies | ||
.*/node_modules/xdl/build/* | ||
.*/node_modules/reqwest/tests/* | ||
|
||
; Ignore missing expo-sdk dependencies (temporarily) | ||
; https://github.com/expo/expo/issues/162 | ||
.*/node_modules/expo/src/* | ||
|
||
; Ignore react-native-fbads dependency of the expo sdk | ||
.*/node_modules/react-native-fbads/* | ||
|
||
[include] | ||
|
||
[libs] | ||
node_modules/react-native/Libraries/react-native/react-native-interface.js | ||
node_modules/react-native/flow | ||
flow/ | ||
|
||
[options] | ||
module.system=haste | ||
|
||
emoji=true | ||
|
||
experimental.strict_type_args=true | ||
|
||
munge_underscores=true | ||
|
||
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' | ||
|
||
suppress_type=$FlowIssue | ||
suppress_type=$FlowFixMe | ||
suppress_type=$FixMe | ||
|
||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(4[0-9]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) | ||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(4[0-9]\\|[1-3][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ | ||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy | ||
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError | ||
|
||
unsafe.enable_getters_and_setters=true | ||
|
||
[version] | ||
^0.49.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
node_modules/ | ||
.expo/ | ||
npm-debug.* | ||
/ios/Pods/ | ||
/ios/build/ | ||
.idea | ||
/android/app/build/ | ||
/android/gradle/ | ||
/android/.idea | ||
/android/.gradle/ | ||
/android/keystores/ | ||
/android/local.properties | ||
/ios/RNFirebaseStarter.xcodeproj/xcuserdata/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
import React from 'react'; | ||
import { StyleSheet, Platform, Image, Text, View } from 'react-native'; | ||
|
||
import firebase from 'react-native-firebase'; | ||
|
||
export default class App extends React.Component { | ||
constructor() { | ||
super(); | ||
this.state = { | ||
// firebase things? | ||
}; | ||
} | ||
|
||
componentDidMount() { | ||
// firebase things? | ||
} | ||
|
||
render() { | ||
return ( | ||
<View style={styles.container}> | ||
<Image source={require('./assets/RNFirebase512x512.png')} style={[styles.logo]} /> | ||
<Text style={styles.welcome}> | ||
Welcome to the React Native{'\n'}Firebase starter project! | ||
</Text> | ||
<Text style={styles.instructions}> | ||
To get started, edit App.js | ||
</Text> | ||
{Platform.OS === 'ios' ? ( | ||
<Text style={styles.instructions}> | ||
Press Cmd+R to reload,{'\n'} | ||
Cmd+D or shake for dev menu | ||
</Text> | ||
) : ( | ||
<Text style={styles.instructions}> | ||
Double tap R on your keyboard to reload,{'\n'} | ||
Cmd+M or shake for dev menu | ||
</Text> | ||
)} | ||
<View style={styles.modules}> | ||
<Text style={styles.modulesHeader}>The following Firebase modules are enabled:</Text> | ||
{firebase.admob.nativeModuleExists && <Text style={styles.module}>Admob</Text>} | ||
{firebase.analytics.nativeModuleExists && <Text style={styles.module}>Analytics</Text>} | ||
{firebase.auth.nativeModuleExists && <Text style={styles.module}>Authentication</Text>} | ||
{firebase.crash.nativeModuleExists && <Text style={styles.module}>Crash Reporting</Text>} | ||
{firebase.firestore.nativeModuleExists && <Text style={styles.module}>Cloud Firestore</Text>} | ||
{firebase.messaging.nativeModuleExists && <Text style={styles.module}>Messaging</Text>} | ||
{firebase.perf.nativeModuleExists && <Text style={styles.module}>Performance Monitoring</Text>} | ||
{firebase.database.nativeModuleExists && <Text style={styles.module}>Realtime Database</Text>} | ||
{firebase.config.nativeModuleExists && <Text style={styles.module}>Remote Config</Text>} | ||
{firebase.storage.nativeModuleExists && <Text style={styles.module}>Storage</Text>} | ||
</View> | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
backgroundColor: '#F5FCFF', | ||
}, | ||
logo: { | ||
height: 80, | ||
marginBottom: 16, | ||
width: 80, | ||
}, | ||
welcome: { | ||
fontSize: 20, | ||
textAlign: 'center', | ||
margin: 10, | ||
}, | ||
instructions: { | ||
textAlign: 'center', | ||
color: '#333333', | ||
marginBottom: 5, | ||
}, | ||
modules: { | ||
margin: 20, | ||
}, | ||
modulesHeader: { | ||
fontSize: 16, | ||
marginBottom: 8, | ||
}, | ||
module: { | ||
fontSize: 14, | ||
marginTop: 4, | ||
textAlign: 'center', | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react'; | ||
import App from './App'; | ||
|
||
import renderer from 'react-test-renderer'; | ||
|
||
it('renders without crashing', () => { | ||
const rendered = renderer.create(<App />).toJSON(); | ||
expect(rendered).toBeTruthy(); | ||
}); |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# To learn about Buck see [Docs](https://buckbuild.com/). | ||
# To run your application with Buck: | ||
# - install Buck | ||
# - `npm start` - to start the packager | ||
# - `cd android` | ||
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` | ||
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck | ||
# - `buck install -r android/app` - compile, install and run application | ||
# | ||
|
||
lib_deps = [] | ||
|
||
for jarfile in glob(['libs/*.jar']): | ||
name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')] | ||
lib_deps.append(':' + name) | ||
prebuilt_jar( | ||
name = name, | ||
binary_jar = jarfile, | ||
) | ||
|
||
for aarfile in glob(['libs/*.aar']): | ||
name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')] | ||
lib_deps.append(':' + name) | ||
android_prebuilt_aar( | ||
name = name, | ||
aar = aarfile, | ||
) | ||
|
||
android_library( | ||
name = "all-libs", | ||
exported_deps = lib_deps, | ||
) | ||
|
||
android_library( | ||
name = "app-code", | ||
srcs = glob([ | ||
"src/main/java/**/*.java", | ||
]), | ||
deps = [ | ||
":all-libs", | ||
":build_config", | ||
":res", | ||
], | ||
) | ||
|
||
android_build_config( | ||
name = "build_config", | ||
package = "com.rnfirebasestarter", | ||
) | ||
|
||
android_resource( | ||
name = "res", | ||
package = "com.rnfirebasestarter", | ||
res = "src/main/res", | ||
) | ||
|
||
android_binary( | ||
name = "app", | ||
keystore = "//android/keystores:debug", | ||
manifest = "src/main/AndroidManifest.xml", | ||
package_type = "debug", | ||
deps = [ | ||
":app-code", | ||
], | ||
) |
Oops, something went wrong.