Skip to content

Commit a201bc9

Browse files
committed
react-native init Sample
0 parents  commit a201bc9

File tree

16 files changed

+1321
-0
lines changed

16 files changed

+1321
-0
lines changed

.flowconfig

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
[ignore]
2+
3+
# We fork some components by platform.
4+
.*/*.web.js
5+
.*/*.android.js
6+
7+
# Some modules have their own node_modules with overlap
8+
.*/node_modules/node-haste/.*
9+
10+
# Ignore react-tools where there are overlaps, but don't ignore anything that
11+
# react-native relies on
12+
.*/node_modules/react-tools/src/React.js
13+
.*/node_modules/react-tools/src/renderers/shared/event/EventPropagators.js
14+
.*/node_modules/react-tools/src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
15+
.*/node_modules/react-tools/src/shared/vendor/core/ExecutionEnvironment.js
16+
17+
18+
# Ignore commoner tests
19+
.*/node_modules/commoner/test/.*
20+
21+
# See https://github.com/facebook/flow/issues/442
22+
.*/react-tools/node_modules/commoner/lib/reader.js
23+
24+
# Ignore jest
25+
.*/react-native/node_modules/jest-cli/.*
26+
27+
[include]
28+
29+
[libs]
30+
node_modules/react-native/Libraries/react-native/react-native-interface.js
31+
32+
[options]
33+
module.system=haste
34+
35+
munge_underscores=true
36+
37+
suppress_type=$FlowIssue
38+
suppress_type=$FlowFixMe
39+
suppress_type=$FixMe
40+
41+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-4]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
42+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-4]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+
43+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
44+
45+
[version]
46+
0.14.0

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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+
project.xcworkspace
24+
25+
# node.js
26+
#
27+
node_modules/
28+
npm-debug.log

.watchmanconfig

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

index.ios.js

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/**
2+
* Sample React Native App
3+
* https://github.com/facebook/react-native
4+
*/
5+
'use strict';
6+
7+
var React = require('react-native');
8+
var {
9+
AppRegistry,
10+
StyleSheet,
11+
Text,
12+
View,
13+
} = React;
14+
15+
var Sample = React.createClass({
16+
render: function() {
17+
return (
18+
<View style={styles.container}>
19+
<Text style={styles.welcome}>
20+
Welcome to React Native!
21+
</Text>
22+
<Text style={styles.instructions}>
23+
To get started, edit index.ios.js
24+
</Text>
25+
<Text style={styles.instructions}>
26+
Press Cmd+R to reload,{'\n'}
27+
Cmd+D or shake for dev menu
28+
</Text>
29+
</View>
30+
);
31+
}
32+
});
33+
34+
var styles = StyleSheet.create({
35+
container: {
36+
flex: 1,
37+
justifyContent: 'center',
38+
alignItems: 'center',
39+
backgroundColor: '#F5FCFF',
40+
},
41+
welcome: {
42+
fontSize: 20,
43+
textAlign: 'center',
44+
margin: 10,
45+
},
46+
instructions: {
47+
textAlign: 'center',
48+
color: '#333333',
49+
marginBottom: 5,
50+
},
51+
});
52+
53+
AppRegistry.registerComponent('Sample', () => Sample);

0 commit comments

Comments
 (0)