stub implementations

This commit is contained in:
Pedro Belo 2016-02-22 13:06:06 -08:00
parent 0016dfc281
commit e7ce38a622
6 changed files with 34 additions and 38 deletions

View File

@ -1,8 +1,5 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
import React, {
AppRegistry,
Component,
@ -11,18 +8,14 @@ import React, {
View
} from 'react-native';
import Config from 'react-native-config';
class Example extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
<Text style={styles.instructions}>
To get started, edit index.android.js
</Text>
<Text style={styles.instructions}>
Shake or press menu button for dev menu
<Text style={styles.text}>
FOO={Config.FOO}
</Text>
</View>
);
@ -36,16 +29,11 @@ const styles = StyleSheet.create({
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
text: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
AppRegistry.registerComponent('Example', () => Example);

View File

@ -1,8 +1,5 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
'use strict';
import React, {
AppRegistry,
Component,
@ -11,19 +8,14 @@ import React, {
View
} from 'react-native';
import Config from 'react-native-config'
class Example extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
<Text style={styles.instructions}>
To get started, edit index.ios.js
</Text>
<Text style={styles.instructions}>
Press Cmd+R to reload,{'\n'}
Cmd+D or shake for dev menu
<Text style={styles.text}>
FOO={Config.FOO}
</Text>
</View>
);
@ -37,16 +29,11 @@ const styles = StyleSheet.create({
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
text: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
AppRegistry.registerComponent('Example', () => Example);

View File

@ -6,6 +6,7 @@
"start": "node node_modules/react-native/local-cli/cli.js start"
},
"dependencies": {
"react-native": "^0.20.0"
"react-native": "^0.20.0",
"react-native-config": "../"
}
}

3
index.android.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = {};

3
index.ios.js Normal file
View File

@ -0,0 +1,3 @@
'use strict';
module.exports = {};

14
package.json Normal file
View File

@ -0,0 +1,14 @@
{
"name": "react-native-config",
"version": "0.0.1",
"description": "Expose config variables to React Native apps",
"keywords": ["env", "config", "config-var", "react-native", "android", "ios", "12factor"],
"homepage": "https://github.com/luggg/react-native-config",
"author": "Pedro Belo",
"files": [
"android/",
"index.android.js",
"index.ios.js"
],
"license": "MIT"
}