diff --git a/src/apis/Animated/index.js b/src/apis/Animated/index.js index 6d929a60..d8405007 100644 --- a/src/apis/Animated/index.js +++ b/src/apis/Animated/index.js @@ -11,7 +11,7 @@ import Image from '../../components/Image' import Text from '../../components/Text' import View from '../../components/View' -export default { +module.exports = { ...AnimatedImplementation, View: AnimatedImplementation.createAnimatedComponent(View), Text: AnimatedImplementation.createAnimatedComponent(Text), diff --git a/src/apis/AppRegistry/ReactNativeApp.js b/src/apis/AppRegistry/ReactNativeApp.js index e935618b..8898721d 100644 --- a/src/apis/AppRegistry/ReactNativeApp.js +++ b/src/apis/AppRegistry/ReactNativeApp.js @@ -4,7 +4,7 @@ import ReactDOM from 'react-dom' import StyleSheet from '../StyleSheet' import View from '../../components/View' -export default class ReactNativeApp extends Component { +class ReactNativeApp extends Component { static propTypes = { initialProps: PropTypes.object, rootComponent: PropTypes.any.isRequired, @@ -45,3 +45,5 @@ const styles = StyleSheet.create({ bottom: 0 } }) + +module.exports = ReactNativeApp diff --git a/src/apis/AppRegistry/index.js b/src/apis/AppRegistry/index.js index f330433d..c9652732 100644 --- a/src/apis/AppRegistry/index.js +++ b/src/apis/AppRegistry/index.js @@ -24,7 +24,7 @@ type AppConfig = { /** * `AppRegistry` is the JS entry point to running all React Native apps. */ -export default class AppRegistry { +class AppRegistry { static getAppKeys(): Array { return Object.keys(runnables) } @@ -88,3 +88,5 @@ export default class AppRegistry { ReactDOM.unmountComponentAtNode(rootTag) } } + +module.exports = AppRegistry diff --git a/src/apis/AppState/index.js b/src/apis/AppState/index.js index 11e52726..14b34ac5 100644 --- a/src/apis/AppState/index.js +++ b/src/apis/AppState/index.js @@ -3,7 +3,7 @@ import invariant from 'fbjs/lib/invariant' const listeners = {} const eventTypes = [ 'change' ] -export default class AppState { +class AppState { static get currentState() { switch (document.visibilityState) { case 'hidden': @@ -27,3 +27,5 @@ export default class AppState { delete listeners[handler] } } + +module.exports = AppState diff --git a/src/apis/AsyncStorage/index.js b/src/apis/AsyncStorage/index.js index c975709a..ae16f5a6 100644 --- a/src/apis/AsyncStorage/index.js +++ b/src/apis/AsyncStorage/index.js @@ -12,7 +12,7 @@ const mergeLocalStorageItem = (key, value) => { window.localStorage.setItem(key, nextValue) } -export default class AsyncStorage { +class AsyncStorage { /** * Erases *all* AsyncStorage for the domain. */ @@ -157,3 +157,5 @@ export default class AsyncStorage { }) } } + +module.exports = AsyncStorage diff --git a/src/apis/Dimensions/index.js b/src/apis/Dimensions/index.js index ed1c7230..715a2a0b 100644 --- a/src/apis/Dimensions/index.js +++ b/src/apis/Dimensions/index.js @@ -23,9 +23,11 @@ const dimensions = { } } -export default class Dimensions { +class Dimensions { static get(dimension: string): Object { invariant(dimensions[dimension], 'No dimension set for key ' + dimension) return dimensions[dimension] } } + +module.exports = Dimensions diff --git a/src/apis/InteractionManager/index.js b/src/apis/InteractionManager/index.js index 45cc1338..15fe9aee 100644 --- a/src/apis/InteractionManager/index.js +++ b/src/apis/InteractionManager/index.js @@ -45,4 +45,4 @@ const InteractionManager = { addListener: () => {} } -export default InteractionManager +module.exports = InteractionManager diff --git a/src/apis/NetInfo/index.js b/src/apis/NetInfo/index.js index 51c6c9c6..06a54db1 100644 --- a/src/apis/NetInfo/index.js +++ b/src/apis/NetInfo/index.js @@ -76,4 +76,4 @@ const NetInfo = { } } -export default NetInfo +module.exports = NetInfo diff --git a/src/apis/PanResponder/normalizeNativeEvent.js b/src/apis/PanResponder/normalizeNativeEvent.js index cfd21cb4..884d90ff 100644 --- a/src/apis/PanResponder/normalizeNativeEvent.js +++ b/src/apis/PanResponder/normalizeNativeEvent.js @@ -81,4 +81,4 @@ function normalizeNativeEvent(nativeEvent) { return mouse ? normalizeMouseEvent(nativeEvent) : normalizeTouchEvent(nativeEvent) } -export default normalizeNativeEvent +module.exports = normalizeNativeEvent diff --git a/src/apis/PixelRatio/index.js b/src/apis/PixelRatio/index.js index 07770e25..3ff1627e 100644 --- a/src/apis/PixelRatio/index.js +++ b/src/apis/PixelRatio/index.js @@ -11,7 +11,7 @@ import Dimensions from '../Dimensions' /** * PixelRatio gives access to the device pixel density. */ -export default class PixelRatio { +class PixelRatio { /** * Returns the device pixel density. */ @@ -45,3 +45,5 @@ export default class PixelRatio { return Math.round(layoutSize * ratio) / ratio } } + +module.exports = PixelRatio diff --git a/src/apis/Platform/index.js b/src/apis/Platform/index.js index 76177f55..8073e5f7 100644 --- a/src/apis/Platform/index.js +++ b/src/apis/Platform/index.js @@ -5,4 +5,4 @@ const Platform = { userAgent: canUseDOM ? window.navigator.userAgent : '' } -export default Platform +module.exports = Platform diff --git a/src/apis/StyleSheet/BorderPropTypes.js b/src/apis/StyleSheet/BorderPropTypes.js index 715baffb..a85aa91a 100644 --- a/src/apis/StyleSheet/BorderPropTypes.js +++ b/src/apis/StyleSheet/BorderPropTypes.js @@ -22,4 +22,4 @@ const BorderPropTypes = { borderLeftStyle: BorderStylePropType } -export default BorderPropTypes +module.exports = BorderPropTypes diff --git a/src/apis/StyleSheet/ColorPropType.js b/src/apis/StyleSheet/ColorPropType.js index adc7e326..754035bb 100644 --- a/src/apis/StyleSheet/ColorPropType.js +++ b/src/apis/StyleSheet/ColorPropType.js @@ -59,4 +59,4 @@ var colorPropType = function(isRequired, props, propName, componentName, locatio var ColorPropType = colorPropType.bind(null, false /* isRequired */); ColorPropType.isRequired = colorPropType.bind(null, true /* isRequired */); -export default ColorPropType +module.exports = ColorPropType diff --git a/src/apis/StyleSheet/LayoutPropTypes.js b/src/apis/StyleSheet/LayoutPropTypes.js index 734a7724..d83f2d09 100644 --- a/src/apis/StyleSheet/LayoutPropTypes.js +++ b/src/apis/StyleSheet/LayoutPropTypes.js @@ -51,4 +51,4 @@ const LayoutPropTypes = { top: numberOrString } -export default LayoutPropTypes +module.exports = LayoutPropTypes diff --git a/src/apis/StyleSheet/Store.js b/src/apis/StyleSheet/Store.js index 251afd37..72d12b90 100644 --- a/src/apis/StyleSheet/Store.js +++ b/src/apis/StyleSheet/Store.js @@ -1,7 +1,7 @@ import prefixAll from 'inline-style-prefix-all' import hyphenate from './hyphenate' -export default class Store { +class Store { constructor( initialState:Object = {}, options:Object = { obfuscateClassNames: false } @@ -95,3 +95,5 @@ export default class Store { } } } + +module.exports = Store diff --git a/src/apis/StyleSheet/StyleSheetPropType.js b/src/apis/StyleSheet/StyleSheetPropType.js index 0e2467f6..8a8d2652 100644 --- a/src/apis/StyleSheet/StyleSheetPropType.js +++ b/src/apis/StyleSheet/StyleSheetPropType.js @@ -8,7 +8,7 @@ import createStrictShapeTypeChecker from './createStrictShapeTypeChecker' import flattenStyle from './flattenStyle' -export default function StyleSheetPropType(shape) { +module.exports = function StyleSheetPropType(shape) { const shapePropType = createStrictShapeTypeChecker(shape) return function (props, propName, componentName, location?) { let newProps = props diff --git a/src/apis/StyleSheet/StyleSheetRegistry.js b/src/apis/StyleSheet/StyleSheetRegistry.js index 823e730a..01f879cc 100644 --- a/src/apis/StyleSheet/StyleSheetRegistry.js +++ b/src/apis/StyleSheet/StyleSheetRegistry.js @@ -9,7 +9,7 @@ import prefixAll from 'inline-style-prefix-all' import flattenStyle from './flattenStyle' -export default class StyleSheetRegistry { +class StyleSheetRegistry { static registerStyle(style: Object, store): number { if (process.env.NODE_ENV !== 'production') { Object.freeze(style) @@ -44,3 +44,5 @@ export default class StyleSheetRegistry { return { className: _className, style: _style } } } + +module.exports = StyleSheetRegistry diff --git a/src/apis/StyleSheet/StyleSheetValidation.js b/src/apis/StyleSheet/StyleSheetValidation.js index 5f79ead6..d792f26d 100644 --- a/src/apis/StyleSheet/StyleSheetValidation.js +++ b/src/apis/StyleSheet/StyleSheetValidation.js @@ -12,7 +12,7 @@ import TextStylePropTypes from '../../components/Text/TextStylePropTypes' import ViewStylePropTypes from '../../components/View/ViewStylePropTypes' import invariant from 'fbjs/lib/invariant' -export default class StyleSheetValidation { +class StyleSheetValidation { static validateStyleProp(prop, style, caller) { if (process.env.NODE_ENV !== 'production') { if (allStylePropTypes[prop] === undefined) { @@ -66,3 +66,5 @@ StyleSheetValidation.addValidStylePropTypes({ listStyle: PropTypes.string, verticalAlign: PropTypes.string }) + +module.exports = StyleSheetValidation diff --git a/src/apis/StyleSheet/TransformPropTypes.js b/src/apis/StyleSheet/TransformPropTypes.js index 53b933c5..ae8e4f03 100644 --- a/src/apis/StyleSheet/TransformPropTypes.js +++ b/src/apis/StyleSheet/TransformPropTypes.js @@ -44,4 +44,4 @@ const TransformPropTypes = { transformMatrix: TransformMatrixPropType } -export default TransformPropTypes +module.exports = TransformPropTypes diff --git a/src/apis/StyleSheet/createStrictShapeTypeChecker.js b/src/apis/StyleSheet/createStrictShapeTypeChecker.js index 24b650c1..80e4d5e5 100644 --- a/src/apis/StyleSheet/createStrictShapeTypeChecker.js +++ b/src/apis/StyleSheet/createStrictShapeTypeChecker.js @@ -12,7 +12,7 @@ import invariant from 'fbjs/lib/invariant' import ReactPropTypeLocationNames from 'react/lib/ReactPropTypeLocationNames' -export default function createStrictShapeTypeChecker(shapeTypes) { +module.exports = function createStrictShapeTypeChecker(shapeTypes) { function checkType(isRequired, props, propName, componentName, location?) { if (!props[propName]) { if (isRequired) { diff --git a/src/apis/StyleSheet/expandStyle.js b/src/apis/StyleSheet/expandStyle.js index 6937dece..2287b2ff 100644 --- a/src/apis/StyleSheet/expandStyle.js +++ b/src/apis/StyleSheet/expandStyle.js @@ -56,4 +56,4 @@ const expandStyle = (style) => { }, {}) } -export default expandStyle +module.exports = expandStyle diff --git a/src/apis/StyleSheet/flattenStyle.js b/src/apis/StyleSheet/flattenStyle.js index bf2c4a92..1e89d53e 100644 --- a/src/apis/StyleSheet/flattenStyle.js +++ b/src/apis/StyleSheet/flattenStyle.js @@ -8,7 +8,7 @@ import invariant from 'fbjs/lib/invariant' import expandStyle from './expandStyle' -export default function flattenStyle(style): ?Object { +module.exports = function flattenStyle(style): ?Object { if (!style) { return undefined } diff --git a/src/apis/StyleSheet/hyphenate.js b/src/apis/StyleSheet/hyphenate.js index f36f6018..e68b8266 100644 --- a/src/apis/StyleSheet/hyphenate.js +++ b/src/apis/StyleSheet/hyphenate.js @@ -1 +1 @@ -export default (string) => (string.replace(/([A-Z])/g, '-$1').toLowerCase()).replace(/^ms-/, '-ms-') +module.exports = (string) => (string.replace(/([A-Z])/g, '-$1').toLowerCase()).replace(/^ms-/, '-ms-') diff --git a/src/apis/StyleSheet/index.js b/src/apis/StyleSheet/index.js index a39f0f7a..87df755d 100644 --- a/src/apis/StyleSheet/index.js +++ b/src/apis/StyleSheet/index.js @@ -65,7 +65,7 @@ const resolve = ({ style = {} }) => { return StyleSheetRegistry.getStyleAsNativeProps(style, store) } -export default { +module.exports = { _destroy, _renderToString, create, diff --git a/src/apis/StyleSheet/normalizeValue.js b/src/apis/StyleSheet/normalizeValue.js index 31f2e2ae..1b644f1b 100644 --- a/src/apis/StyleSheet/normalizeValue.js +++ b/src/apis/StyleSheet/normalizeValue.js @@ -30,4 +30,4 @@ const normalizeValue = (property, value) => { return value } -export default normalizeValue +module.exports = normalizeValue diff --git a/src/apis/UIManager/index.js b/src/apis/UIManager/index.js index 38ad962a..dc1d0888 100644 --- a/src/apis/UIManager/index.js +++ b/src/apis/UIManager/index.js @@ -32,4 +32,4 @@ const UIManager = { } } -export default UIManager +module.exports = UIManager diff --git a/src/components/ActivityIndicator/index.js b/src/components/ActivityIndicator/index.js index c2711328..6a456287 100644 --- a/src/components/ActivityIndicator/index.js +++ b/src/components/ActivityIndicator/index.js @@ -20,7 +20,7 @@ const keyframeEffects = [ ] @NativeMethodsDecorator -export default class ActivityIndicator extends Component { +class ActivityIndicator extends Component { static propTypes = { animating: PropTypes.bool, color: PropTypes.string, @@ -107,3 +107,5 @@ const indicatorStyles = StyleSheet.create({ height: 36 } }) + +module.exports = ActivityIndicator diff --git a/src/components/CoreComponent/index.js b/src/components/CoreComponent/index.js index 54bb8f00..72dda200 100644 --- a/src/components/CoreComponent/index.js +++ b/src/components/CoreComponent/index.js @@ -19,7 +19,7 @@ const roleComponents = { } @NativeMethodsDecorator -export default class CoreComponent extends Component { +class CoreComponent extends Component { static propTypes = { accessibilityLabel: PropTypes.string, accessibilityLiveRegion: PropTypes.oneOf([ 'assertive', 'off', 'polite' ]), @@ -64,3 +64,5 @@ export default class CoreComponent extends Component { ) } } + +module.exports = CoreComponent diff --git a/src/components/Image/ImageResizeMode.js b/src/components/Image/ImageResizeMode.js index c78e2914..072c1fa8 100644 --- a/src/components/Image/ImageResizeMode.js +++ b/src/components/Image/ImageResizeMode.js @@ -7,4 +7,4 @@ const ImageResizeMode = keyMirror({ stretch: null }) -export default ImageResizeMode +module.exports = ImageResizeMode diff --git a/src/components/Image/ImageStylePropTypes.js b/src/components/Image/ImageStylePropTypes.js index d44c0cb6..9bd0b7f0 100644 --- a/src/components/Image/ImageStylePropTypes.js +++ b/src/components/Image/ImageStylePropTypes.js @@ -6,7 +6,7 @@ import ImageResizeMode from './ImageResizeMode' const hiddenOrVisible = PropTypes.oneOf([ 'hidden', 'visible' ]) -export default { +module.exports = { ...LayoutPropTypes, ...TransformPropTypes, backfaceVisibility: hiddenOrVisible, diff --git a/src/components/Image/index.js b/src/components/Image/index.js index 89e17522..6753686b 100644 --- a/src/components/Image/index.js +++ b/src/components/Image/index.js @@ -23,7 +23,7 @@ const ImageSourcePropType = PropTypes.oneOfType([ ]) @NativeMethodsDecorator -export default class Image extends Component { +class Image extends Component { static propTypes = { accessibilityLabel: CoreComponent.propTypes.accessibilityLabel, accessible: CoreComponent.propTypes.accessible, @@ -217,3 +217,5 @@ const resizeModeStyles = StyleSheet.create({ backgroundSize: '100% 100%' } }) + +module.exports = Image diff --git a/src/components/Image/resolveAssetSource.js b/src/components/Image/resolveAssetSource.js index f0ad2dc5..2991ecec 100644 --- a/src/components/Image/resolveAssetSource.js +++ b/src/components/Image/resolveAssetSource.js @@ -2,4 +2,4 @@ function resolveAssetSource(source) { return ((typeof source === 'object') ? source.uri : source) || null } -export default resolveAssetSource +module.exports = resolveAssetSource diff --git a/src/components/ListView/index.js b/src/components/ListView/index.js index 9a913daa..bed504e5 100644 --- a/src/components/ListView/index.js +++ b/src/components/ListView/index.js @@ -3,7 +3,7 @@ import React, { Component, PropTypes } from 'react' import ScrollView from '../ScrollView' @NativeMethodsDecorator -export default class ListView extends Component { +class ListView extends Component { static propTypes = { children: PropTypes.any, style: ScrollView.propTypes.style @@ -19,3 +19,5 @@ export default class ListView extends Component { ) } } + +module.exports = ListView diff --git a/src/components/Portal/index.js b/src/components/Portal/index.js index 5d09ff70..518ab929 100644 --- a/src/components/Portal/index.js +++ b/src/components/Portal/index.js @@ -19,7 +19,7 @@ let lastUsedTag = 0 /** * A container that renders all the modals on top of everything else in the application. */ -export default class Portal extends Component { +class Portal extends Component { static propTypes = { onModalVisibilityChanged: PropTypes.func.isRequired }; @@ -154,3 +154,5 @@ const styles = StyleSheet.create({ bottom: 0 } }) + +module.exports = Portal diff --git a/src/components/ScrollView/index.js b/src/components/ScrollView/index.js index f0b0c11e..226c2eed 100644 --- a/src/components/ScrollView/index.js +++ b/src/components/ScrollView/index.js @@ -128,3 +128,5 @@ const styles = StyleSheet.create({ flexDirection: 'row' } }) + +module.exports = ScrollView diff --git a/src/components/StaticContainer/index.js b/src/components/StaticContainer/index.js index 8f6a4ba9..3d941b8c 100644 --- a/src/components/StaticContainer/index.js +++ b/src/components/StaticContainer/index.js @@ -23,7 +23,7 @@ import React, { Component, PropTypes } from 'react' * Typically, you will not need to use this component and should opt for normal * React reconciliation. */ -export default class StaticContainer extends Component { +class StaticContainer extends Component { static propTypes = { children: PropTypes.any.isRequired, shouldUpdate: PropTypes.bool.isRequired @@ -38,3 +38,5 @@ export default class StaticContainer extends Component { return (child === null || child === false) ? null : React.Children.only(child) } } + +module.exports = StaticContainer diff --git a/src/components/StaticRenderer/index.js b/src/components/StaticRenderer/index.js index 12e0438c..78b83e6b 100644 --- a/src/components/StaticRenderer/index.js +++ b/src/components/StaticRenderer/index.js @@ -22,7 +22,7 @@ import { Component, PropTypes } from 'react' * React reconciliation. */ -export default class StaticRenderer extends Component { +class StaticRenderer extends Component { static propTypes = { render: PropTypes.func.isRequired, shouldUpdate: PropTypes.bool.isRequired @@ -36,3 +36,5 @@ export default class StaticRenderer extends Component { return this.props.render() } } + +module.exports = StaticRenderer diff --git a/src/components/Text/TextStylePropTypes.js b/src/components/Text/TextStylePropTypes.js index afd3a27a..5be12d90 100644 --- a/src/components/Text/TextStylePropTypes.js +++ b/src/components/Text/TextStylePropTypes.js @@ -5,7 +5,7 @@ import ViewStylePropTypes from '../View/ViewStylePropTypes' const { number, oneOf, oneOfType, string } = PropTypes const numberOrString = oneOfType([ number, string ]) -export default { +module.exports = { ...ViewStylePropTypes, color: ColorPropType, fontFamily: string, diff --git a/src/components/Text/index.js b/src/components/Text/index.js index b47836f3..87a0671a 100644 --- a/src/components/Text/index.js +++ b/src/components/Text/index.js @@ -6,7 +6,7 @@ import StyleSheetPropType from '../../apis/StyleSheet/StyleSheetPropType' import TextStylePropTypes from './TextStylePropTypes' @NativeMethodsDecorator -export default class Text extends Component { +class Text extends Component { static propTypes = { accessibilityLabel: CoreComponent.propTypes.accessibilityLabel, accessibilityRole: CoreComponent.propTypes.accessibilityRole, @@ -66,3 +66,5 @@ const styles = StyleSheet.create({ whiteSpace: 'nowrap' } }) + +module.exports = Text diff --git a/src/components/TextInput/index.js b/src/components/TextInput/index.js index 4319d016..c3955bfc 100644 --- a/src/components/TextInput/index.js +++ b/src/components/TextInput/index.js @@ -8,7 +8,7 @@ import TextareaAutosize from 'react-textarea-autosize' import View from '../View' @NativeMethodsDecorator -export default class TextInput extends Component { +class TextInput extends Component { static propTypes = { ...View.propTypes, autoComplete: PropTypes.bool, @@ -229,3 +229,5 @@ const styles = StyleSheet.create({ whiteSpace: 'pre' } }) + +module.exports = TextInput diff --git a/src/components/View/ViewStylePropTypes.js b/src/components/View/ViewStylePropTypes.js index 22400739..93ad847f 100644 --- a/src/components/View/ViewStylePropTypes.js +++ b/src/components/View/ViewStylePropTypes.js @@ -8,7 +8,7 @@ const { number, oneOf, string } = PropTypes const autoOrHiddenOrVisible = oneOf([ 'auto', 'hidden', 'visible' ]) const hiddenOrVisible = oneOf([ 'hidden', 'visible' ]) -export default { +module.exports = { ...BorderPropTypes, ...LayoutPropTypes, ...TransformPropTypes, diff --git a/src/components/View/index.js b/src/components/View/index.js index 22610479..d70fd5f3 100644 --- a/src/components/View/index.js +++ b/src/components/View/index.js @@ -6,7 +6,7 @@ import StyleSheetPropType from '../../apis/StyleSheet/StyleSheetPropType' import ViewStylePropTypes from './ViewStylePropTypes' @NativeMethodsDecorator -export default class View extends Component { +class View extends Component { static propTypes = { accessibilityLabel: CoreComponent.propTypes.accessibilityLabel, accessibilityLiveRegion: CoreComponent.propTypes.accessibilityLiveRegion, @@ -185,3 +185,5 @@ const styles = StyleSheet.create({ textAlign: 'inherit' } }) + +module.exports = View diff --git a/src/modules/NativeModules/index.js b/src/modules/NativeModules/index.js index 50939364..6d390f56 100644 --- a/src/modules/NativeModules/index.js +++ b/src/modules/NativeModules/index.js @@ -1,3 +1,2 @@ // NativeModules shim -const NativeModules = {} -export default NativeModules +module.exports = {}