mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3bc500f021 | ||
|
|
5f8c3e0291 | ||
|
|
d2cb63dbc8 | ||
|
|
cc4fadac5f | ||
|
|
0877f2c4de | ||
|
|
5470bb2c30 | ||
|
|
8373e630c9 |
+7
-12
@@ -3,25 +3,21 @@ language: objective-c
|
||||
osx_image: xcode8.3
|
||||
|
||||
install:
|
||||
- mkdir -p /Users/travis/build/facebook/.nvm
|
||||
- export NVM_DIR="/Users/travis/build/facebook/.nvm"
|
||||
- brew install nvm
|
||||
- source $(brew --prefix nvm)/nvm.sh
|
||||
# TODO npm 2 started stalling on Travis, t11852928
|
||||
|
||||
# Use node 6 because that is what runs on land-blocking tests
|
||||
- nvm install 6
|
||||
- nvm install 7
|
||||
- rm -Rf "${TMPDIR}/jest_preprocess_cache"
|
||||
- wget https://github.com/yarnpkg/yarn/releases/download/v0.16.0/yarn-0.16.0.js
|
||||
- export yarn="node $(pwd)/yarn-0.16.0.js"
|
||||
- $yarn install
|
||||
|
||||
script:
|
||||
- if [[ "$TEST_TYPE" = objc-ios ]]; then travis_retry travis_wait ./scripts/objc-test-ios.sh test; fi
|
||||
- if [[ "$TEST_TYPE" = objc-tvos ]]; then travis_retry travis_wait ./scripts/objc-test-tvos.sh; fi
|
||||
- if [[ "$TEST_TYPE" = objc-ios ]]; then travis_retry travis_wait 30 ./scripts/objc-test-ios.sh test; fi
|
||||
- if [[ "$TEST_TYPE" = objc-tvos ]]; then travis_retry travis_wait 30 ./scripts/objc-test-tvos.sh; fi
|
||||
- if [[ "$TEST_TYPE" = e2e-objc ]]; then node ./scripts/run-ci-e2e-tests.js --ios --js --retries 3; fi
|
||||
- if [[ ( "$TEST_TYPE" = podspecs ) && ( "$TRAVIS_PULL_REQUEST" = "false" ) ]]; then gem install cocoapods && ./scripts/process-podspecs.sh; fi
|
||||
- if [[ ( "$TEST_TYPE" = podspecs ) && ( "$TRAVIS_PULL_REQUEST" = "false" ) ]]; then gem install cocoapods && travis_wait 30 ./scripts/process-podspecs.sh; fi
|
||||
|
||||
cache:
|
||||
- cocoapods
|
||||
- yarn
|
||||
|
||||
matrix:
|
||||
- fast_finish: true # Fail the whole build as soon as one test type fails. Should help with Travis capacity issues (very long queues).
|
||||
@@ -41,7 +37,6 @@ branches:
|
||||
notifications:
|
||||
email:
|
||||
recipients:
|
||||
- mkonicek@fb.com
|
||||
- douglowder@mac.com # Doug Lowder built and maintains Apple TV specific code and wants to be notified about tvOS failures.
|
||||
- eloy@artsy.net # Eloy Durán maintains the podspecs test and wants to be notified about failures.
|
||||
on_failure: change
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var createReactClass = require('create-react-class');
|
||||
var ReactNative = require('react-native');
|
||||
var {
|
||||
Image,
|
||||
@@ -58,7 +59,8 @@ type State = {
|
||||
containerStyle?: Style,
|
||||
};
|
||||
|
||||
var LayoutEventsTest = React.createClass({
|
||||
var LayoutEventsTest = createReactClass({
|
||||
displayName: 'LayoutEventsTest',
|
||||
getInitialState(): State {
|
||||
return {
|
||||
didAnimation: false,
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var createReactClass = require('create-react-class');
|
||||
var ReactNative = require('react-native');
|
||||
var RCTNativeAppEventEmitter = require('RCTNativeAppEventEmitter');
|
||||
var Subscribable = require('Subscribable');
|
||||
@@ -24,7 +25,8 @@ var reactViewHeight = 102;
|
||||
var newReactViewWidth = 201;
|
||||
var newReactViewHeight = 202;
|
||||
|
||||
var ReactContentSizeUpdateTest = React.createClass({
|
||||
var ReactContentSizeUpdateTest = createReactClass({
|
||||
displayName: 'ReactContentSizeUpdateTest',
|
||||
mixins: [Subscribable.Mixin,
|
||||
TimerMixin],
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var createReactClass = require('create-react-class');
|
||||
var ReactNative = require('react-native');
|
||||
var RCTNativeAppEventEmitter = require('RCTNativeAppEventEmitter');
|
||||
var Subscribable = require('Subscribable');
|
||||
@@ -22,7 +23,8 @@ var reactViewHeight = 222;
|
||||
|
||||
var finalState = false;
|
||||
|
||||
var SizeFlexibilityUpdateTest = React.createClass({
|
||||
var SizeFlexibilityUpdateTest = createReactClass({
|
||||
displayName: 'SizeFlexibilityUpdateTest',
|
||||
mixins: [Subscribable.Mixin],
|
||||
|
||||
componentWillMount: function() {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var createReactClass = require('create-react-class');
|
||||
var ReactNative = require('react-native');
|
||||
var TimerMixin = require('react-timer-mixin');
|
||||
|
||||
@@ -22,7 +23,8 @@ var {
|
||||
} = ReactNative;
|
||||
var { TestModule } = ReactNative.NativeModules;
|
||||
|
||||
var TimersTest = React.createClass({
|
||||
var TimersTest = createReactClass({
|
||||
displayName: 'TimersTest',
|
||||
mixins: [TimerMixin],
|
||||
|
||||
_nextTest: () => {},
|
||||
|
||||
@@ -20,6 +20,7 @@ const StyleSheet = require('StyleSheet');
|
||||
const View = require('View');
|
||||
const ViewPropTypes = require('ViewPropTypes');
|
||||
|
||||
const createReactClass = require('create-react-class');
|
||||
const requireNativeComponent = require('requireNativeComponent');
|
||||
|
||||
const GRAY = '#999999';
|
||||
@@ -36,7 +37,8 @@ type DefaultProps = {
|
||||
/**
|
||||
* Displays a circular loading indicator.
|
||||
*/
|
||||
const ActivityIndicator = React.createClass({
|
||||
const ActivityIndicator = createReactClass({
|
||||
displayName: 'ActivityIndicator',
|
||||
mixins: [NativeMethodsMixin],
|
||||
|
||||
propTypes: {
|
||||
|
||||
@@ -20,6 +20,7 @@ const StyleSheet = require('StyleSheet');
|
||||
const View = require('View');
|
||||
const ViewPropTypes = require('ViewPropTypes');
|
||||
|
||||
const createReactClass = require('create-react-class');
|
||||
const requireNativeComponent = require('requireNativeComponent');
|
||||
|
||||
type DefaultProps = {
|
||||
@@ -36,7 +37,8 @@ type Event = Object;
|
||||
* source of truth.
|
||||
*/
|
||||
// $FlowFixMe(>=0.41.0)
|
||||
const DatePickerIOS = React.createClass({
|
||||
const DatePickerIOS = createReactClass({
|
||||
displayName: 'DatePickerIOS',
|
||||
// TOOD: Put a better type for _picker
|
||||
_picker: (undefined: ?$FlowFixMe),
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ var ViewPropTypes = require('ViewPropTypes');
|
||||
|
||||
var DrawerConsts = UIManager.AndroidDrawerLayout.Constants;
|
||||
|
||||
var createReactClass = require('create-react-class');
|
||||
var dismissKeyboard = require('dismissKeyboard');
|
||||
var requireNativeComponent = require('requireNativeComponent');
|
||||
|
||||
@@ -67,7 +68,8 @@ var DRAWER_STATES = [
|
||||
* },
|
||||
* ```
|
||||
*/
|
||||
var DrawerLayoutAndroid = React.createClass({
|
||||
var DrawerLayoutAndroid = createReactClass({
|
||||
displayName: 'DrawerLayoutAndroid',
|
||||
statics: {
|
||||
positions: DrawerConsts.DrawerPosition,
|
||||
},
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const createReactClass = require('create-react-class');
|
||||
const Keyboard = require('Keyboard');
|
||||
const LayoutAnimation = require('LayoutAnimation');
|
||||
const Platform = require('Platform');
|
||||
@@ -53,7 +54,8 @@ const viewRef = 'VIEW';
|
||||
* It can automatically adjust either its position or bottom padding based on the position of the keyboard.
|
||||
*/
|
||||
// $FlowFixMe(>=0.41.0)
|
||||
const KeyboardAvoidingView = React.createClass({
|
||||
const KeyboardAvoidingView = createReactClass({
|
||||
displayName: 'KeyboardAvoidingView',
|
||||
mixins: [TimerMixin],
|
||||
|
||||
propTypes: {
|
||||
|
||||
@@ -11,10 +11,12 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('React');
|
||||
var createReactClass = require('create-react-class');
|
||||
var PropTypes = require('prop-types');
|
||||
var TimerMixin = require('react-timer-mixin');
|
||||
|
||||
var LazyRenderer = React.createClass({
|
||||
var LazyRenderer = createReactClass({
|
||||
displayName: 'LazyRenderer',
|
||||
mixin: [TimerMixin],
|
||||
|
||||
propTypes: {
|
||||
|
||||
@@ -23,6 +23,7 @@ var TVEventHandler = require('TVEventHandler');
|
||||
var View = require('View');
|
||||
var ViewPropTypes = require('ViewPropTypes');
|
||||
|
||||
var createReactClass = require('create-react-class');
|
||||
var invariant = require('fbjs/lib/invariant');
|
||||
var logError = require('logError');
|
||||
var requireNativeComponent = require('requireNativeComponent');
|
||||
@@ -304,7 +305,8 @@ type Event = Object;
|
||||
* is pushed.
|
||||
*
|
||||
*/
|
||||
var NavigatorIOS = React.createClass({
|
||||
var NavigatorIOS = createReactClass({
|
||||
displayName: 'NavigatorIOS',
|
||||
|
||||
propTypes: {
|
||||
|
||||
|
||||
@@ -22,10 +22,12 @@ var View = require('View');
|
||||
const ViewPropTypes = require('ViewPropTypes');
|
||||
var processColor = require('processColor');
|
||||
|
||||
var createReactClass = require('create-react-class');
|
||||
var itemStylePropType = StyleSheetPropType(TextStylePropTypes);
|
||||
var requireNativeComponent = require('requireNativeComponent');
|
||||
|
||||
var PickerIOS = React.createClass({
|
||||
var PickerIOS = createReactClass({
|
||||
displayName: 'PickerIOS',
|
||||
mixins: [NativeMethodsMixin],
|
||||
|
||||
propTypes: {
|
||||
|
||||
@@ -16,6 +16,7 @@ var PropTypes = require('prop-types');
|
||||
var ViewPropTypes = require('ViewPropTypes');
|
||||
var ColorPropType = require('ColorPropType');
|
||||
|
||||
var createReactClass = require('create-react-class');
|
||||
var requireNativeComponent = require('requireNativeComponent');
|
||||
|
||||
var STYLE_ATTRIBUTES = [
|
||||
@@ -63,7 +64,8 @@ var indeterminateType = function(props, propName, componentName, ...rest) {
|
||||
* },
|
||||
* ```
|
||||
*/
|
||||
var ProgressBarAndroid = React.createClass({
|
||||
var ProgressBarAndroid = createReactClass({
|
||||
displayName: 'ProgressBarAndroid',
|
||||
propTypes: {
|
||||
...ViewPropTypes,
|
||||
/**
|
||||
|
||||
@@ -18,13 +18,15 @@ var PropTypes = require('prop-types');
|
||||
var StyleSheet = require('StyleSheet');
|
||||
var ViewPropTypes = require('ViewPropTypes');
|
||||
|
||||
var createReactClass = require('create-react-class');
|
||||
var requireNativeComponent = require('requireNativeComponent');
|
||||
|
||||
/**
|
||||
* Use `ProgressViewIOS` to render a UIProgressView on iOS.
|
||||
*/
|
||||
// $FlowFixMe(>=0.41.0)
|
||||
var ProgressViewIOS = React.createClass({
|
||||
var ProgressViewIOS = createReactClass({
|
||||
displayName: 'ProgressViewIOS',
|
||||
mixins: [NativeMethodsMixin],
|
||||
|
||||
propTypes: {
|
||||
|
||||
@@ -18,6 +18,7 @@ const React = require('React');
|
||||
const PropTypes = require('prop-types');
|
||||
const ViewPropTypes = require('ViewPropTypes');
|
||||
|
||||
const createReactClass = require('create-react-class');
|
||||
const requireNativeComponent = require('requireNativeComponent');
|
||||
|
||||
if (Platform.OS === 'android') {
|
||||
@@ -72,7 +73,8 @@ if (Platform.OS === 'android') {
|
||||
* in the `onRefresh` function otherwise the refresh indicator will stop immediately.
|
||||
*/
|
||||
// $FlowFixMe(>=0.41.0)
|
||||
const RefreshControl = React.createClass({
|
||||
const RefreshControl = createReactClass({
|
||||
displayName: 'RefreshControl',
|
||||
statics: {
|
||||
SIZE: RefreshLayoutConsts.SIZE,
|
||||
},
|
||||
|
||||
@@ -27,6 +27,7 @@ const View = require('View');
|
||||
const ViewPropTypes = require('ViewPropTypes');
|
||||
const ViewStylePropTypes = require('ViewStylePropTypes');
|
||||
|
||||
const createReactClass = require('create-react-class');
|
||||
const dismissKeyboard = require('dismissKeyboard');
|
||||
const flattenStyle = require('flattenStyle');
|
||||
const invariant = require('fbjs/lib/invariant');
|
||||
@@ -72,7 +73,8 @@ import type {NativeMethodsMixinType} from 'ReactNativeTypes';
|
||||
* supports out of the box.
|
||||
*/
|
||||
// $FlowFixMe(>=0.41.0)
|
||||
const ScrollView = React.createClass({
|
||||
const ScrollView = createReactClass({
|
||||
displayName: 'ScrollView',
|
||||
propTypes: {
|
||||
...ViewPropTypes,
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,7 @@ var PropTypes = require('prop-types');
|
||||
var StyleSheet = require('StyleSheet');
|
||||
var ViewPropTypes = require('ViewPropTypes');
|
||||
|
||||
var createReactClass = require('create-react-class');
|
||||
var requireNativeComponent = require('requireNativeComponent');
|
||||
|
||||
type DefaultProps = {
|
||||
@@ -49,7 +50,8 @@ type Event = Object;
|
||||
* ````
|
||||
*/
|
||||
// $FlowFixMe(>=0.41.0)
|
||||
var SegmentedControlIOS = React.createClass({
|
||||
var SegmentedControlIOS = createReactClass({
|
||||
displayName: 'SegmentedControlIOS',
|
||||
mixins: [NativeMethodsMixin],
|
||||
|
||||
propTypes: {
|
||||
|
||||
@@ -21,6 +21,7 @@ var PropTypes = require('prop-types');
|
||||
var StyleSheet = require('StyleSheet');
|
||||
var ViewPropTypes = require('ViewPropTypes');
|
||||
|
||||
var createReactClass = require('create-react-class');
|
||||
var requireNativeComponent = require('requireNativeComponent');
|
||||
|
||||
type Event = Object;
|
||||
@@ -29,7 +30,8 @@ type Event = Object;
|
||||
* A component used to select a single value from a range of values.
|
||||
*/
|
||||
// $FlowFixMe(>=0.41.0)
|
||||
var Slider = React.createClass({
|
||||
var Slider = createReactClass({
|
||||
displayName: 'Slider',
|
||||
mixins: [NativeMethodsMixin],
|
||||
|
||||
propTypes: {
|
||||
|
||||
@@ -19,6 +19,7 @@ const PropTypes = require('prop-types');
|
||||
var StyleSheet = require('StyleSheet');
|
||||
const ViewPropTypes = require('ViewPropTypes');
|
||||
|
||||
var createReactClass = require('create-react-class');
|
||||
var requireNativeComponent = require('requireNativeComponent');
|
||||
|
||||
type DefaultProps = {
|
||||
@@ -38,7 +39,8 @@ type DefaultProps = {
|
||||
* @keyword toggle
|
||||
*/
|
||||
// $FlowFixMe(>=0.41.0)
|
||||
var Switch = React.createClass({
|
||||
var Switch = createReactClass({
|
||||
displayName: 'Switch',
|
||||
propTypes: {
|
||||
...ViewPropTypes,
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,7 @@ const EventEmitter = require('EventEmitter');
|
||||
const NativeMethodsMixin = require('NativeMethodsMixin');
|
||||
const Platform = require('Platform');
|
||||
const React = require('React');
|
||||
const createReactClass = require('create-react-class');
|
||||
const PropTypes = require('prop-types');
|
||||
const ReactNative = require('ReactNative');
|
||||
const StyleSheet = require('StyleSheet');
|
||||
@@ -168,7 +169,8 @@ const DataDetectorTypes = [
|
||||
*
|
||||
*/
|
||||
// $FlowFixMe(>=0.41.0)
|
||||
const TextInput = React.createClass({
|
||||
const TextInput = createReactClass({
|
||||
displayName: 'TextInput',
|
||||
statics: {
|
||||
/* TODO(brentvatne) docs are needed for this */
|
||||
State: TextInputState,
|
||||
|
||||
@@ -20,6 +20,7 @@ var UIManager = require('UIManager');
|
||||
var ViewPropTypes = require('ViewPropTypes');
|
||||
var ColorPropType = require('ColorPropType');
|
||||
|
||||
var createReactClass = require('create-react-class');
|
||||
var requireNativeComponent = require('requireNativeComponent');
|
||||
var resolveAssetSource = require('resolveAssetSource');
|
||||
|
||||
@@ -65,7 +66,8 @@ var optionalImageSource = PropTypes.oneOfType([
|
||||
*
|
||||
* [0]: https://developer.android.com/reference/android/support/v7/widget/Toolbar.html
|
||||
*/
|
||||
var ToolbarAndroid = React.createClass({
|
||||
var ToolbarAndroid = createReactClass({
|
||||
displayName: 'ToolbarAndroid',
|
||||
mixins: [NativeMethodsMixin],
|
||||
|
||||
propTypes: {
|
||||
|
||||
@@ -15,6 +15,7 @@ var Animated = require('Animated');
|
||||
var EdgeInsetsPropType = require('EdgeInsetsPropType');
|
||||
var NativeMethodsMixin = require('NativeMethodsMixin');
|
||||
var React = require('React');
|
||||
var createReactClass = require('create-react-class');
|
||||
var PropTypes = require('prop-types');
|
||||
var Touchable = require('Touchable');
|
||||
|
||||
@@ -35,7 +36,8 @@ var PRESS_RETENTION_OFFSET = {top: 20, left: 20, right: 20, bottom: 30};
|
||||
* interesting interactions such as `handleTouchablePress`.
|
||||
*/
|
||||
// $FlowFixMe(>=0.41.0)
|
||||
var TouchableBounce = React.createClass({
|
||||
var TouchableBounce = createReactClass({
|
||||
displayName: 'TouchableBounce',
|
||||
mixins: [Touchable.Mixin, NativeMethodsMixin],
|
||||
|
||||
propTypes: {
|
||||
|
||||
@@ -25,6 +25,7 @@ var TouchableWithoutFeedback = require('TouchableWithoutFeedback');
|
||||
var View = require('View');
|
||||
const ViewPropTypes = require('ViewPropTypes');
|
||||
|
||||
var createReactClass = require('create-react-class');
|
||||
var ensureComponentIsNative = require('ensureComponentIsNative');
|
||||
var ensurePositiveDelayProps = require('ensurePositiveDelayProps');
|
||||
var keyOf = require('fbjs/lib/keyOf');
|
||||
@@ -68,7 +69,8 @@ var PRESS_RETENTION_OFFSET = {top: 20, left: 20, right: 20, bottom: 30};
|
||||
* ```
|
||||
*/
|
||||
|
||||
var TouchableHighlight = React.createClass({
|
||||
var TouchableHighlight = createReactClass({
|
||||
displayName: 'TouchableHighlight',
|
||||
propTypes: {
|
||||
...TouchableWithoutFeedback.propTypes,
|
||||
/**
|
||||
|
||||
@@ -18,6 +18,7 @@ var Touchable = require('Touchable');
|
||||
var TouchableWithoutFeedback = require('TouchableWithoutFeedback');
|
||||
var UIManager = require('UIManager');
|
||||
|
||||
var createReactClass = require('create-react-class');
|
||||
var ensurePositiveDelayProps = require('ensurePositiveDelayProps');
|
||||
var processColor = require('processColor');
|
||||
|
||||
@@ -70,7 +71,8 @@ var PRESS_RETENTION_OFFSET = {top: 20, left: 20, right: 20, bottom: 30};
|
||||
* ```
|
||||
*/
|
||||
|
||||
var TouchableNativeFeedback = React.createClass({
|
||||
var TouchableNativeFeedback = createReactClass({
|
||||
displayName: 'TouchableNativeFeedback',
|
||||
propTypes: {
|
||||
...TouchableWithoutFeedback.propTypes,
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ var TimerMixin = require('react-timer-mixin');
|
||||
var Touchable = require('Touchable');
|
||||
var TouchableWithoutFeedback = require('TouchableWithoutFeedback');
|
||||
|
||||
var createReactClass = require('create-react-class');
|
||||
var ensurePositiveDelayProps = require('ensurePositiveDelayProps');
|
||||
var flattenStyle = require('flattenStyle');
|
||||
|
||||
@@ -51,7 +52,8 @@ var PRESS_RETENTION_OFFSET = {top: 20, left: 20, right: 20, bottom: 30};
|
||||
* },
|
||||
* ```
|
||||
*/
|
||||
var TouchableOpacity = React.createClass({
|
||||
var TouchableOpacity = createReactClass({
|
||||
displayName: 'TouchableOpacity',
|
||||
mixins: [TimerMixin, Touchable.Mixin, NativeMethodsMixin],
|
||||
|
||||
propTypes: {
|
||||
|
||||
@@ -17,6 +17,7 @@ const PropTypes = require('prop-types');
|
||||
const TimerMixin = require('react-timer-mixin');
|
||||
const Touchable = require('Touchable');
|
||||
|
||||
const createReactClass = require('create-react-class');
|
||||
const ensurePositiveDelayProps = require('ensurePositiveDelayProps');
|
||||
const warning = require('fbjs/lib/warning');
|
||||
|
||||
@@ -37,7 +38,8 @@ const PRESS_RETENTION_OFFSET = {top: 20, left: 20, right: 20, bottom: 30};
|
||||
* If you wish to have several child components, wrap them in a View.
|
||||
*/
|
||||
// $FlowFixMe(>=0.41.0)
|
||||
const TouchableWithoutFeedback = React.createClass({
|
||||
const TouchableWithoutFeedback = createReactClass({
|
||||
displayName: 'TouchableWithoutFeedback',
|
||||
mixins: [TimerMixin, Touchable.Mixin],
|
||||
|
||||
propTypes: {
|
||||
|
||||
@@ -19,6 +19,7 @@ const ReactNativeStyleAttributes = require('ReactNativeStyleAttributes');
|
||||
const ReactNativeViewAttributes = require('ReactNativeViewAttributes');
|
||||
const ViewPropTypes = require('ViewPropTypes');
|
||||
|
||||
const createReactClass = require('create-react-class');
|
||||
const invariant = require('fbjs/lib/invariant');
|
||||
const requireNativeComponent = require('requireNativeComponent');
|
||||
|
||||
@@ -73,7 +74,8 @@ export type Props = ViewProps;
|
||||
* - `touches` - Array of all current touches on the screen.
|
||||
*/
|
||||
// $FlowFixMe(>=0.41.0)
|
||||
const View = React.createClass({
|
||||
const View = createReactClass({
|
||||
displayName: 'View',
|
||||
// TODO: We should probably expose the mixins, viewConfig, and statics publicly. For example,
|
||||
// one of the props is of type AccessibilityComponentType. That is defined as a const[] above,
|
||||
// but it is not rendered by the docs, since `statics` below is not rendered. So its Possible
|
||||
|
||||
@@ -20,6 +20,7 @@ const StyleSheet = require('StyleSheet');
|
||||
const TimerMixin = require('react-timer-mixin');
|
||||
const View = require('View');
|
||||
|
||||
const createReactClass = require('create-react-class');
|
||||
const emptyFunction = require('fbjs/lib/emptyFunction');
|
||||
|
||||
const IS_RTL = I18nManager.isRTL;
|
||||
@@ -61,7 +62,8 @@ const RIGHT_SWIPE_THRESHOLD = 30 * SLOW_SPEED_SWIPE_FACTOR;
|
||||
* used in a normal ListView. See the renderRow for SwipeableListView to see how
|
||||
* to use this component separately.
|
||||
*/
|
||||
const SwipeableRow = React.createClass({
|
||||
const SwipeableRow = createReactClass({
|
||||
displayName: 'SwipeableRow',
|
||||
_panResponder: {},
|
||||
_previousLeft: CLOSED_LEFT_POSITION,
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ var View = require('View');
|
||||
var ViewPropTypes = require('ViewPropTypes');
|
||||
var ViewStylePropTypes = require('ViewStylePropTypes');
|
||||
|
||||
var createReactClass = require('create-react-class');
|
||||
var filterObject = require('fbjs/lib/filterObject');
|
||||
var flattenStyle = require('flattenStyle');
|
||||
var merge = require('merge');
|
||||
@@ -76,7 +77,8 @@ var ImageViewAttributes = merge(ReactNativeViewAttributes.UIView, {
|
||||
var ViewStyleKeys = new Set(Object.keys(ViewStylePropTypes));
|
||||
var ImageSpecificStyleKeys = new Set(Object.keys(ImageStylePropTypes).filter(x => !ViewStyleKeys.has(x)));
|
||||
|
||||
var Image = React.createClass({
|
||||
var Image = createReactClass({
|
||||
displayName: 'Image',
|
||||
propTypes: {
|
||||
...ViewPropTypes,
|
||||
style: StyleSheetPropType(ImageStylePropTypes),
|
||||
|
||||
@@ -23,6 +23,7 @@ const ReactNativeViewAttributes = require('ReactNativeViewAttributes');
|
||||
const StyleSheet = require('StyleSheet');
|
||||
const StyleSheetPropType = require('StyleSheetPropType');
|
||||
|
||||
const createReactClass = require('create-react-class');
|
||||
const flattenStyle = require('flattenStyle');
|
||||
const requireNativeComponent = require('requireNativeComponent');
|
||||
const resolveAssetSource = require('resolveAssetSource');
|
||||
@@ -126,7 +127,8 @@ const ImageViewManager = NativeModules.ImageViewManager;
|
||||
*
|
||||
*/
|
||||
// $FlowFixMe(>=0.41.0)
|
||||
const Image = React.createClass({
|
||||
const Image = createReactClass({
|
||||
displayName: 'Image',
|
||||
propTypes: {
|
||||
/**
|
||||
* > `ImageResizeMode` is an `Enum` for different image resizing modes, set via the
|
||||
|
||||
@@ -25,6 +25,7 @@ var TimerMixin = require('react-timer-mixin');
|
||||
var View = require('View');
|
||||
|
||||
var cloneReferencedElement = require('react-clone-referenced-element');
|
||||
var createReactClass = require('create-react-class');
|
||||
var isEmpty = require('isEmpty');
|
||||
var merge = require('merge');
|
||||
|
||||
@@ -85,7 +86,8 @@ var DEFAULT_SCROLL_CALLBACK_THROTTLE = 50;
|
||||
* rendering rows.
|
||||
*/
|
||||
|
||||
var ListView = React.createClass({
|
||||
var ListView = createReactClass({
|
||||
displayName: 'ListView',
|
||||
_childFrames: ([]: Array<Object>),
|
||||
_sentEndForContentLength: (null: ?number),
|
||||
_scrollComponent: (null: any),
|
||||
|
||||
@@ -9,10 +9,11 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import <RCTText/RCTTextInput.h>
|
||||
#import <React/RCTComponent.h>
|
||||
#import <React/RCTView.h>
|
||||
|
||||
#import "RCTTextInput.h"
|
||||
|
||||
@class RCTUITextField;
|
||||
|
||||
@interface RCTTextField : RCTTextInput
|
||||
|
||||
@@ -9,9 +9,10 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import <RCTText/RCTBackedTextInputViewProtocol.h>
|
||||
#import <React/RCTView.h>
|
||||
|
||||
#import "RCTBackedTextInputViewProtocol.h"
|
||||
|
||||
@class RCTBridge;
|
||||
@class RCTEventDispatcher;
|
||||
|
||||
|
||||
@@ -9,10 +9,11 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import <RCTText/RCTTextInput.h>
|
||||
#import <React/RCTView.h>
|
||||
#import <React/UIView+React.h>
|
||||
|
||||
#import "RCTTextInput.h"
|
||||
|
||||
@class RCTBridge;
|
||||
|
||||
@interface RCTTextView : RCTTextInput <UITextViewDelegate>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import <RCTText/RCTBackedTextInputViewProtocol.h>
|
||||
#import "RCTBackedTextInputViewProtocol.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import <RCTText/RCTBackedTextInputViewProtocol.h>
|
||||
#import "RCTBackedTextInputViewProtocol.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ const StyleSheetPropType = require('StyleSheetPropType');
|
||||
const TextStylePropTypes = require('TextStylePropTypes');
|
||||
const Touchable = require('Touchable');
|
||||
|
||||
const createReactClass = require('create-react-class');
|
||||
const createReactNativeComponentClass = require('createReactNativeComponentClass');
|
||||
const mergeFast = require('mergeFast');
|
||||
const processColor = require('processColor');
|
||||
@@ -96,7 +97,8 @@ const viewConfig = {
|
||||
*/
|
||||
|
||||
// $FlowFixMe(>=0.41.0)
|
||||
const Text = React.createClass({
|
||||
const Text = createReactClass({
|
||||
displayName: 'Text',
|
||||
propTypes: {
|
||||
/**
|
||||
* When `numberOfLines` is set, this prop defines how text will be truncated.
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var createReactClass = require('create-react-class');
|
||||
var ReactNative = require('react-native');
|
||||
var TimerMixin = require('react-timer-mixin');
|
||||
var {
|
||||
@@ -22,7 +23,8 @@ var {
|
||||
|
||||
var TestManager = NativeModules.TestManager || NativeModules.SnapshotTestManager;
|
||||
|
||||
var TextUpdateTest = React.createClass({
|
||||
var TextUpdateTest = createReactClass({
|
||||
displayName: 'TextUpdateTest',
|
||||
mixins: [TimerMixin],
|
||||
getInitialState: function() {
|
||||
return {seeMore: true};
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var createReactClass = require('create-react-class');
|
||||
const PropTypes = require('prop-types');
|
||||
var ReactNative = require('react-native');
|
||||
var {
|
||||
@@ -71,7 +72,8 @@ var propTypes = {
|
||||
|
||||
};
|
||||
|
||||
var CameraRollView = React.createClass({
|
||||
var CameraRollView = createReactClass({
|
||||
displayName: 'CameraRollView',
|
||||
// $FlowFixMe(>=0.41.0)
|
||||
propTypes: propTypes,
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var createReactClass = require('create-react-class');
|
||||
var ReactNative = require('react-native');
|
||||
var {
|
||||
ActivityIndicator,
|
||||
@@ -29,7 +30,8 @@ var ImageCapInsetsExample = require('./ImageCapInsetsExample');
|
||||
const IMAGE_PREFETCH_URL = 'http://origami.design/public/images/bird-logo.png?r=1&t=' + Date.now();
|
||||
var prefetchTask = Image.prefetch(IMAGE_PREFETCH_URL);
|
||||
|
||||
var NetworkImageCallbackExample = React.createClass({
|
||||
var NetworkImageCallbackExample = createReactClass({
|
||||
displayName: 'NetworkImageCallbackExample',
|
||||
getInitialState: function() {
|
||||
return {
|
||||
events: [],
|
||||
@@ -102,7 +104,7 @@ var NetworkImageCallbackExample = React.createClass({
|
||||
}
|
||||
});
|
||||
|
||||
var NetworkImageExample = React.createClass({
|
||||
var NetworkImageExample = createReactClass({
|
||||
getInitialState: function() {
|
||||
return {
|
||||
error: false,
|
||||
@@ -130,7 +132,7 @@ var NetworkImageExample = React.createClass({
|
||||
}
|
||||
});
|
||||
|
||||
var ImageSizeExample = React.createClass({
|
||||
var ImageSizeExample = createReactClass({
|
||||
getInitialState: function() {
|
||||
return {
|
||||
width: 0,
|
||||
@@ -162,7 +164,7 @@ var ImageSizeExample = React.createClass({
|
||||
},
|
||||
});
|
||||
|
||||
var MultipleSourcesExample = React.createClass({
|
||||
var MultipleSourcesExample = createReactClass({
|
||||
getInitialState: function() {
|
||||
return {
|
||||
width: 30,
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var createReactClass = require('create-react-class');
|
||||
var ReactNative = require('react-native');
|
||||
var {
|
||||
Image,
|
||||
@@ -24,7 +25,8 @@ var {
|
||||
|
||||
var RNTesterPage = require('./RNTesterPage');
|
||||
|
||||
var ListViewSimpleExample = React.createClass({
|
||||
var ListViewSimpleExample = createReactClass({
|
||||
displayName: 'ListViewSimpleExample',
|
||||
statics: {
|
||||
title: '<ListView>',
|
||||
description: 'Performant, scrollable list of data.'
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var createReactClass = require('create-react-class');
|
||||
var ReactNative = require('react-native');
|
||||
var {
|
||||
Image,
|
||||
@@ -37,7 +38,8 @@ var THUMB_URLS = [
|
||||
require('./Thumbnails/victory.png'),
|
||||
];
|
||||
|
||||
var ListViewGridLayoutExample = React.createClass({
|
||||
var ListViewGridLayoutExample = createReactClass({
|
||||
displayName: 'ListViewGridLayoutExample',
|
||||
|
||||
statics: {
|
||||
title: '<ListView> - Grid Layout',
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var createReactClass = require('create-react-class');
|
||||
var ReactNative = require('react-native');
|
||||
var {
|
||||
PanResponder,
|
||||
@@ -21,7 +22,8 @@ var {
|
||||
|
||||
var CIRCLE_SIZE = 80;
|
||||
|
||||
var PanResponderExample = React.createClass({
|
||||
var PanResponderExample = createReactClass({
|
||||
displayName: 'PanResponderExample',
|
||||
|
||||
statics: {
|
||||
title: 'PanResponder Sample',
|
||||
|
||||
@@ -13,12 +13,14 @@
|
||||
|
||||
var ProgressBar = require('ProgressBarAndroid');
|
||||
var React = require('React');
|
||||
var createReactClass = require('create-react-class');
|
||||
var RNTesterBlock = require('RNTesterBlock');
|
||||
var RNTesterPage = require('RNTesterPage');
|
||||
|
||||
var TimerMixin = require('react-timer-mixin');
|
||||
|
||||
var MovingBar = React.createClass({
|
||||
var MovingBar = createReactClass({
|
||||
displayName: 'MovingBar',
|
||||
mixins: [TimerMixin],
|
||||
|
||||
getInitialState: function() {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var createReactClass = require('create-react-class');
|
||||
var ReactNative = require('react-native');
|
||||
var {
|
||||
ProgressViewIOS,
|
||||
@@ -20,7 +21,8 @@ var {
|
||||
} = ReactNative;
|
||||
var TimerMixin = require('react-timer-mixin');
|
||||
|
||||
var ProgressViewExample = React.createClass({
|
||||
var ProgressViewExample = createReactClass({
|
||||
displayName: 'ProgressViewExample',
|
||||
mixins: [TimerMixin],
|
||||
|
||||
getInitialState() {
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var createReactClass = require('create-react-class');
|
||||
var ReactNative = require('react-native');
|
||||
var {
|
||||
Image,
|
||||
@@ -25,7 +26,8 @@ var {
|
||||
|
||||
var RNTesterPage = require('./RNTesterPage');
|
||||
|
||||
var SwipeableListViewSimpleExample = React.createClass({
|
||||
var SwipeableListViewSimpleExample = createReactClass({
|
||||
displayName: 'SwipeableListViewSimpleExample',
|
||||
statics: {
|
||||
title: '<SwipeableListView>',
|
||||
description: 'Performant, scrollable, swipeable list of data.'
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
const Platform = require('Platform');
|
||||
var React = require('react');
|
||||
var createReactClass = require('create-react-class');
|
||||
var ReactNative = require('react-native');
|
||||
var {
|
||||
Image,
|
||||
@@ -72,7 +73,8 @@ class AttributeToggler extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
var AdjustingFontSize = React.createClass({
|
||||
var AdjustingFontSize = createReactClass({
|
||||
displayName: 'AdjustingFontSize',
|
||||
getInitialState: function() {
|
||||
return {dynamicText:'', shouldRender: true,};
|
||||
},
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
'use strict';
|
||||
|
||||
var React = require('react');
|
||||
var createReactClass = require('create-react-class');
|
||||
var ReactNative = require('react-native');
|
||||
var {
|
||||
AlertIOS,
|
||||
@@ -111,7 +112,8 @@ class RequestIdleCallbackTester extends React.Component {
|
||||
};
|
||||
}
|
||||
|
||||
var TimerTester = React.createClass({
|
||||
var TimerTester = createReactClass({
|
||||
displayName: 'TimerTester',
|
||||
mixins: [TimerMixin],
|
||||
|
||||
_ii: 0,
|
||||
|
||||
+17
-2
@@ -44,7 +44,16 @@ Pod::Spec.new do |s|
|
||||
s.subspec "Core" do |ss|
|
||||
ss.dependency "Yoga", "#{package["version"]}.React"
|
||||
ss.source_files = "React/**/*.{c,h,m,mm,S}"
|
||||
ss.exclude_files = "**/__tests__/*", "IntegrationTests/*", "React/DevSupport/*", "React/**/RCTTVView.*", "ReactCommon/yoga/*", "React/Cxx*/*", "React/Base/RCTBatchedBridge.mm", "React/Executors/*"
|
||||
ss.exclude_files = "**/__tests__/*",
|
||||
"IntegrationTests/*",
|
||||
"React/DevSupport/*",
|
||||
"React/Inspector/*",
|
||||
"React/**/RCTTVView.*",
|
||||
"ReactCommon/yoga/*",
|
||||
"React/Cxx*/*",
|
||||
"React/Base/RCTBatchedBridge.mm",
|
||||
"React/Executors/*"
|
||||
ss.header_dir = "React"
|
||||
ss.framework = "JavaScriptCore"
|
||||
ss.libraries = "stdc++"
|
||||
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
|
||||
@@ -68,7 +77,8 @@ Pod::Spec.new do |s|
|
||||
s.subspec "DevSupport" do |ss|
|
||||
ss.dependency "React/Core"
|
||||
ss.dependency "React/RCTWebSocket"
|
||||
ss.source_files = "React/DevSupport/*"
|
||||
ss.source_files = "React/DevSupport/*",
|
||||
"React/Inspector/*"
|
||||
end
|
||||
|
||||
s.subspec "tvOS" do |ss|
|
||||
@@ -188,4 +198,9 @@ Pod::Spec.new do |s|
|
||||
ss.source_files = "Libraries/RCTTest/**/*.{h,m}"
|
||||
ss.frameworks = "XCTest"
|
||||
end
|
||||
|
||||
s.subspec "_ignore_me_subspec_for_linting_" do |ss|
|
||||
ss.dependency "React/Core"
|
||||
ss.dependency "React/CxxBridge"
|
||||
end
|
||||
end
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#import "RCTBridge+Private.h"
|
||||
#import "RCTBridgeModule.h"
|
||||
#import "RCTEventDispatcher.h"
|
||||
#import "RCTInspectorDevServerHelper.h"
|
||||
#import "RCTJSCSamplingProfiler.h"
|
||||
#import "RCTJSEnvironment.h"
|
||||
#import "RCTLog.h"
|
||||
@@ -44,6 +43,12 @@ NSString *const kRCTDevSettingsUserDefaultsKey = @"RCTDevMenu";
|
||||
#import "RCTPackagerConnection.h"
|
||||
#endif
|
||||
|
||||
#define ENABLE_INSPECTOR RCT_DEV && __has_include("RCTInspectorDevServerHelper")
|
||||
|
||||
#if ENABLE_INSPECTOR
|
||||
#import "RCTInspectorDevServerHelper.h"
|
||||
#endif
|
||||
|
||||
#if RCT_DEV
|
||||
|
||||
@interface RCTDevSettingsUserDefaultsDataSource : NSObject <RCTDevSettingsDataSource>
|
||||
@@ -162,7 +167,7 @@ RCT_EXPORT_MODULE()
|
||||
_bridge = bridge;
|
||||
[self _configurePackagerConnection];
|
||||
|
||||
#if RCT_DEV
|
||||
#if ENABLE_INSPECTOR
|
||||
// we need this dispatch back to the main thread because even though this
|
||||
// is executed on the main thread, at this point the bridge is not yet
|
||||
// finished with its initialisation. But it does finish by the time it
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
VERSION_NAME=1000.0.0-master
|
||||
VERSION_NAME=0.47.0-rc.2
|
||||
GROUP=com.facebook.react
|
||||
|
||||
POM_NAME=ReactNative
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
var BatchedBridge = require('BatchedBridge');
|
||||
var React = require('React');
|
||||
var createReactClass = require('create-react-class');
|
||||
var View = require('View');
|
||||
var ScrollView = require('ScrollView');
|
||||
var Text = require('Text');
|
||||
@@ -64,7 +65,8 @@ var onItemPress = function(itemNumber) {
|
||||
ScrollListener.onItemPress(itemNumber);
|
||||
};
|
||||
|
||||
var ScrollViewTestApp = React.createClass({
|
||||
var ScrollViewTestApp = createReactClass({
|
||||
displayName: 'ScrollViewTestApp',
|
||||
getInitialState: getInitialState,
|
||||
onScroll: onScroll,
|
||||
onItemPress: onItemPress,
|
||||
@@ -90,7 +92,8 @@ var ScrollViewTestApp = React.createClass({
|
||||
},
|
||||
});
|
||||
|
||||
var HorizontalScrollViewTestApp = React.createClass({
|
||||
var HorizontalScrollViewTestApp = createReactClass({
|
||||
displayName: 'HorizontalScrollViewTestApp',
|
||||
getInitialState: getInitialState,
|
||||
onScroll: onScroll,
|
||||
onItemPress: onItemPress,
|
||||
|
||||
@@ -17,9 +17,11 @@ var StyleSheet = require('StyleSheet');
|
||||
var View = require('View');
|
||||
var Text = require('Text');
|
||||
|
||||
var createReactClass = require('create-react-class');
|
||||
var renderApplication = require('renderApplication');
|
||||
|
||||
var FlexTestApp = React.createClass({
|
||||
var FlexTestApp = createReactClass({
|
||||
displayName: 'FlexTestApp',
|
||||
_styles: StyleSheet.create({
|
||||
container: {
|
||||
width: 200,
|
||||
@@ -47,7 +49,8 @@ var FlexTestApp = React.createClass({
|
||||
}
|
||||
});
|
||||
|
||||
var FlexWithText = React.createClass({
|
||||
var FlexWithText = createReactClass({
|
||||
displayName: 'FlexWithText',
|
||||
_styles: StyleSheet.create({
|
||||
container: {
|
||||
flexDirection: 'column',
|
||||
@@ -75,7 +78,8 @@ var FlexWithText = React.createClass({
|
||||
}
|
||||
});
|
||||
|
||||
var AbsolutePositionTestApp = React.createClass({
|
||||
var AbsolutePositionTestApp = createReactClass({
|
||||
displayName: 'AbsolutePositionTestApp',
|
||||
_styles: StyleSheet.create({
|
||||
absolute: {
|
||||
position: 'absolute',
|
||||
@@ -90,7 +94,8 @@ var AbsolutePositionTestApp = React.createClass({
|
||||
}
|
||||
});
|
||||
|
||||
var AbsolutePositionBottomRightTestApp = React.createClass({
|
||||
var AbsolutePositionBottomRightTestApp = createReactClass({
|
||||
displayName: 'AbsolutePositionBottomRightTestApp',
|
||||
_styles: StyleSheet.create({
|
||||
container: {
|
||||
width: 100,
|
||||
@@ -113,7 +118,8 @@ var AbsolutePositionBottomRightTestApp = React.createClass({
|
||||
}
|
||||
});
|
||||
|
||||
var CenteredTextView = React.createClass({
|
||||
var CenteredTextView = createReactClass({
|
||||
displayName: 'CenteredTextView',
|
||||
_styles: StyleSheet.create({
|
||||
parent: {
|
||||
width: 200,
|
||||
@@ -139,7 +145,8 @@ var CenteredTextView = React.createClass({
|
||||
});
|
||||
|
||||
var flushUpdatePositionInList = null;
|
||||
var UpdatePositionInListTestApp = React.createClass({
|
||||
var UpdatePositionInListTestApp = createReactClass({
|
||||
displayName: 'UpdatePositionInListTestApp',
|
||||
_styles: StyleSheet.create({
|
||||
element: {
|
||||
height: 10,
|
||||
|
||||
@@ -123,7 +123,7 @@ If you run this you will immediately see this error: `Touchable child
|
||||
must either be native or forward setNativeProps to a native component`.
|
||||
This occurs because `MyButton` isn't directly backed by a native view
|
||||
whose opacity should be set. You can think about it like this: if you
|
||||
define a component with `React.createClass` you would not expect to be
|
||||
define a component with `createReactClass` you would not expect to be
|
||||
able to set a style prop on it and have that work - you would need to
|
||||
pass the style prop down to a child, unless you are wrapping a native
|
||||
component. Similarly, we are going to forward `setNativeProps` to a
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ This library does not ship with React Native - in order to use it on your projec
|
||||
```javascript
|
||||
import TimerMixin from 'react-timer-mixin';
|
||||
|
||||
var Component = React.createClass({
|
||||
var Component = createReactClass({
|
||||
mixins: [TimerMixin],
|
||||
componentDidMount: function() {
|
||||
this.setTimeout(
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native",
|
||||
"version": "1000.0.0",
|
||||
"version": "0.47.0-rc.2",
|
||||
"description": "A framework for building native apps using React",
|
||||
"license": "BSD-3-Clause",
|
||||
"repository": {
|
||||
@@ -237,4 +237,4 @@
|
||||
"shelljs": "0.6.0",
|
||||
"sinon": "^2.2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ cd "$ROOT"
|
||||
|
||||
SCHEME="RNTester"
|
||||
SDK="iphonesimulator"
|
||||
DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=10.1"
|
||||
DESTINATION="platform=iOS Simulator,name=iPhone 5s,OS=10.3.1"
|
||||
|
||||
# If there is a "test" argument, pass it to the test script.
|
||||
# If there's a "test" argument, pass it to the test script.
|
||||
. ./scripts/objc-test.sh $1
|
||||
|
||||
@@ -15,7 +15,7 @@ cd "$ROOT"
|
||||
|
||||
SCHEME="RNTester-tvOS"
|
||||
SDK="appletvsimulator"
|
||||
DESTINATION="platform=tvOS Simulator,name=Apple TV 1080p,OS=10.1"
|
||||
DESTINATION="platform=tvOS Simulator,name=Apple TV 1080p,OS=10.2"
|
||||
|
||||
# If there's a "test" argument, pass it to the test script.
|
||||
. ./scripts/objc-test.sh $1
|
||||
|
||||
+19
-10
@@ -3,7 +3,6 @@ set -ex
|
||||
|
||||
SCRIPTS=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
ROOT=$(dirname $SCRIPTS)
|
||||
YOGA_ROOT="$ROOT/ReactCommon/yoga"
|
||||
|
||||
# Specify `SPEC_REPO` as an env variable if you want to push to a specific spec repo.
|
||||
# Defaults to `react-test`, which is meant to be a dummy repo used to test that the specs fully lint.
|
||||
@@ -14,17 +13,17 @@ SPEC_REPO_DIR="$HOME/.cocoapods/repos/$SPEC_REPO"
|
||||
if ! [ -d "$SPEC_REPO_DIR" ]; then
|
||||
mkdir -p "$SPEC_REPO_DIR"
|
||||
cd "$SPEC_REPO_DIR"
|
||||
echo "testing" > .gitkeep
|
||||
touch .gitkeep
|
||||
git init
|
||||
git add .gitkeep
|
||||
git add .
|
||||
git commit -m "init"
|
||||
git remote add origin "https://example.com/$SPEC_REPO.git"
|
||||
fi
|
||||
|
||||
cd "$SPEC_REPO_DIR"
|
||||
SPEC_REPO_REMOTE=$(git remote get-url origin)
|
||||
SPEC_REPOS="$(git remote get-url origin),https://github.com/CocoaPods/Specs.git"
|
||||
|
||||
POD_LINT_OPT="--verbose --allow-warnings --fail-fast --private --swift-version=3.0 --sources=$SPEC_REPO_REMOTE"
|
||||
POD_LINT_OPT="--verbose --allow-warnings --fail-fast --private --swift-version=3.0 --sources=$SPEC_REPOS"
|
||||
|
||||
# Get the version from a podspec.
|
||||
version() {
|
||||
@@ -33,8 +32,12 @@ version() {
|
||||
|
||||
# Lint both framework and static library builds.
|
||||
lint() {
|
||||
pod lib lint $POD_LINT_OPT
|
||||
pod lib lint $POD_LINT_OPT --use-libraries
|
||||
local SUBSPEC=$1
|
||||
if [ "${SUBSPEC:-}" ]; then
|
||||
local SUBSPEC_OPT="--subspec=$SUBSPEC"
|
||||
fi
|
||||
pod lib lint $SUBSPEC_OPT $POD_LINT_OPT
|
||||
pod lib lint $SUBSPEC_OPT $POD_LINT_OPT --use-libraries
|
||||
}
|
||||
|
||||
# Push the spec in arg `$1`, which is expected to be in the cwd, to the `SPEC_REPO` in JSON format.
|
||||
@@ -52,11 +55,17 @@ push() {
|
||||
process() {
|
||||
cd $1
|
||||
if [ -z "$SKIP_LINT" ]; then
|
||||
lint
|
||||
lint $2
|
||||
fi
|
||||
local SPEC_NAME=(*.podspec)
|
||||
push $SPEC_NAME
|
||||
}
|
||||
|
||||
process $YOGA_ROOT
|
||||
process $ROOT
|
||||
# Make third-party deps accessible
|
||||
cd "$ROOT/third-party-podspecs"
|
||||
push Folly.podspec
|
||||
push DoubleConversion.podspec
|
||||
push GLog.podspec
|
||||
|
||||
process "$ROOT/ReactCommon/yoga"
|
||||
process "$ROOT" _ignore_me_subspec_for_linting_
|
||||
|
||||
@@ -38,35 +38,6 @@ success "Generated artifacts for Maven"
|
||||
|
||||
npm install
|
||||
|
||||
success "Killing any running packagers"
|
||||
lsof -i :8081 | grep LISTEN
|
||||
lsof -i :8081 | grep LISTEN | /usr/bin/awk '{print $2}' | xargs kill
|
||||
|
||||
info "Start the packager in another terminal by running 'npm start' from the root"
|
||||
info "and then press any key."
|
||||
info ""
|
||||
read -n 1
|
||||
|
||||
./gradlew :RNTester:android:app:installDebug || error "Couln't build RNTester Android"
|
||||
|
||||
info "Press any key to run RNTester in an already running Android emulator/device"
|
||||
info ""
|
||||
read -n 1
|
||||
adb shell am start -n com.facebook.react.uiapp/.RNTesterActivity
|
||||
|
||||
info "Press any key to open the project in Xcode, then build and test manually."
|
||||
info ""
|
||||
read -n 1
|
||||
open "RNTester/RNTester.xcodeproj"
|
||||
|
||||
info "When done testing RNTester app on iOS and Android press any key to continue."
|
||||
info ""
|
||||
read -n 1
|
||||
|
||||
success "Killing packager"
|
||||
lsof -i :8081 | grep LISTEN
|
||||
lsof -i :8081 | grep LISTEN | /usr/bin/awk '{print $2}' | xargs kill
|
||||
|
||||
npm pack
|
||||
|
||||
PACKAGE=$(pwd)/react-native-$PACKAGE_VERSION.tgz
|
||||
|
||||
@@ -12,16 +12,19 @@ Pod::Spec.new do |spec|
|
||||
spec.dependency 'DoubleConversion'
|
||||
spec.dependency 'GLog'
|
||||
spec.compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
|
||||
spec.header_mappings_dir = 'folly'
|
||||
spec.source_files = 'folly/Bits.cpp',
|
||||
'folly/Conv.cpp',
|
||||
'folly/Demangle.cpp',
|
||||
'folly/StringBase.cpp',
|
||||
'folly/Unicode.cpp',
|
||||
'folly/dynamic.cpp',
|
||||
'folly/json.cpp'
|
||||
'folly/json.cpp',
|
||||
'folly/portability/BitsFunctexcept.cpp',
|
||||
'folly/detail/MallocImpl.cpp'
|
||||
# workaround for https://github.com/facebook/react-native/issues/14326
|
||||
spec.preserve_paths = 'folly/*.h'
|
||||
spec.preserve_paths = 'folly/*.h',
|
||||
'folly/detail/*.h',
|
||||
'folly/portability/*.h'
|
||||
spec.libraries = "stdc++"
|
||||
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
|
||||
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
|
||||
@@ -29,17 +32,4 @@ Pod::Spec.new do |spec|
|
||||
|
||||
# Pinning to the same version as React.podspec.
|
||||
spec.platform = :ios, '8.0'
|
||||
|
||||
spec.subspec "detail" do |ss|
|
||||
ss.header_dir = 'folly/detail'
|
||||
ss.source_files = 'folly/detail/*.h',
|
||||
'folly/detail/MallocImpl.cpp'
|
||||
end
|
||||
|
||||
spec.subspec "portability" do |ss|
|
||||
ss.header_dir = 'folly/portability'
|
||||
ss.source_files = 'folly/portability/*.h',
|
||||
'folly/portability/BitsFunctexcept.cpp'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"optimist": "0.6.0",
|
||||
"prop-types": "^15.5.8",
|
||||
"react": "~0.13.0",
|
||||
"react-docgen": "3.0.0-beta2",
|
||||
"react-docgen": "3.0.0-beta5",
|
||||
"react-page-middleware": "0.4.1",
|
||||
"remove-markdown": "^0.1.0",
|
||||
"request": "^2.69.0",
|
||||
|
||||
Reference in New Issue
Block a user