Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
kmagiera committed Apr 25, 2018
0 parents commit cb0a268
Show file tree
Hide file tree
Showing 156 changed files with 19,907 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .babelrc
@@ -0,0 +1,3 @@
{
"presets": ["react-native"]
}
6 changes: 6 additions & 0 deletions .buckconfig
@@ -0,0 +1,6 @@

[android]
target = Google Inc.:Google APIs:23

[maven_repositories]
central = https://repo1.maven.org/maven2
53 changes: 53 additions & 0 deletions .flowconfig
@@ -0,0 +1,53 @@
[ignore]
; We fork some components by platform
.*/*[.]android.js

; 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

; Ignore polyfills
.*/Libraries/polyfills/.*

; Ignore any possible duplicates from within our Example folder
.*/Example/node_modules/.*

[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow/

[options]
emoji=true

module.system=haste

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'

module.file_ext=.js
module.file_ext=.jsx
module.file_ext=.json
module.file_ext=.native.js

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FixMe

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-6]\\|[1-4][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.56.0
48 changes: 48 additions & 0 deletions .gitignore
@@ -0,0 +1,48 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IJ
#
*.iml
.idea
.gradle
local.properties

# node.js
#
node_modules/
npm-debug.log
package-lock.json

# vscode
jsconfig.json
.project
.vscode

# BUCK
buck-out/
bin/
\.buckd/
android/app/libs
android/keystores/debug.keystore
1 change: 1 addition & 0 deletions .npmignore
@@ -0,0 +1 @@
Example/
1 change: 1 addition & 0 deletions .watchmanconfig
@@ -0,0 +1 @@
{}
3 changes: 3 additions & 0 deletions Example/.babelrc
@@ -0,0 +1,3 @@
{
"presets": ["react-native"]
}
6 changes: 6 additions & 0 deletions Example/.buckconfig
@@ -0,0 +1,6 @@

[android]
target = Google Inc.:Google APIs:23

[maven_repositories]
central = https://repo1.maven.org/maven2
54 changes: 54 additions & 0 deletions Example/.flowconfig
@@ -0,0 +1,54 @@
[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

; Ignore polyfills
.*/Libraries/polyfills/.*

; Ignore metro
.*/node_modules/metro/.*

[include]

[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow/
node_modules/react-native/flow-github/

[options]
emoji=true

module.system=haste

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'

module.file_ext=.js
module.file_ext=.jsx
module.file_ext=.json
module.file_ext=.native.js

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState

suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError

[version]
^0.67.0
1 change: 1 addition & 0 deletions Example/.gitattributes
@@ -0,0 +1 @@
*.pbxproj -text
56 changes: 56 additions & 0 deletions Example/.gitignore
@@ -0,0 +1,56 @@
# OSX
#
.DS_Store

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml

# node.js
#
node_modules/
npm-debug.log
yarn-error.log

# BUCK
buck-out/
\.buckd/
*.keystore

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots

# Bundle artifact
*.jsbundle
1 change: 1 addition & 0 deletions Example/.watchmanconfig
@@ -0,0 +1 @@
{}
91 changes: 91 additions & 0 deletions Example/App.js
@@ -0,0 +1,91 @@
import React from 'react';
import { Text, View, FlatList, StyleSheet, YellowBox } from 'react-native';
import { StackNavigator } from 'react-navigation';
import { RectButton, ScrollView } from 'react-native-gesture-handler';

import Snappable from './snappable';
import ImageViewer from './imageViewer';
import Test from './test';

YellowBox.ignoreWarnings([
'Warning: isMounted(...) is deprecated',
'Module RCTImageLoader',
]);
// refers to bug in React Navigation which should be fixed soon
// https://github.com/react-navigation/react-navigation/issues/3956

const SCREENS = {
Snappable: { screen: Snappable, title: 'Snappable' },
Test: { screen: Test, title: 'Test' },
ImageViewer: { screen: ImageViewer, title: 'Image Viewer' },
};

class MainScreen extends React.Component {
static navigationOptions = {
title: '🎬 Reanimated Demo',
};
render() {
const data = Object.keys(SCREENS).map(key => ({ key }));
return (
<FlatList
style={styles.list}
data={data}
ItemSeparatorComponent={ItemSeparator}
renderItem={props => (
<MainScreenItem
{...props}
onPressItem={({ key }) => this.props.navigation.navigate(key)}
/>
)}
renderScrollComponent={props => <ScrollView {...props} />}
/>
);
}
}

const ItemSeparator = () => <View style={styles.separator} />;

class MainScreenItem extends React.Component {
_onPress = () => this.props.onPressItem(this.props.item);
render() {
const { key } = this.props.item;
return (
<RectButton style={styles.button} onPress={this._onPress}>
<Text style={styles.buttonText}>{SCREENS[key].title || key}</Text>
</RectButton>
);
}
}

const ExampleApp = StackNavigator(
{
Main: { screen: MainScreen },
...SCREENS,
},
{
initialRouteName: 'Snappable',
}
);

const styles = StyleSheet.create({
list: {
backgroundColor: '#EFEFF4',
},
separator: {
height: 1,
backgroundColor: '#DBDBE0',
},
buttonText: {
backgroundColor: 'transparent',
},
button: {
flex: 1,
height: 60,
padding: 10,
flexDirection: 'row',
alignItems: 'center',
backgroundColor: '#fff',
},
});

export default ExampleApp;

0 comments on commit cb0a268

Please sign in to comment.