[ReactNative] expose missing haste modules through 'react-native' node module

This commit is contained in:
Philipp von Weitershausen 2015-06-30 18:44:02 -07:00
parent d7ddff7554
commit 14fef6474d
8 changed files with 21 additions and 14 deletions

View File

@ -17,11 +17,12 @@
var React = require('react-native');
var {
ActionSheetIOS,
StyleSheet,
Text,
View,
} = React;
var ActionSheetIOS = require('ActionSheetIOS');
var BUTTONS = [
'Button Index: 0',
'Button Index: 1',

View File

@ -15,10 +15,9 @@
*/
'use strict';
var AdSupportIOS = require('AdSupportIOS');
var React = require('react-native');
var {
AdSupportIOS,
StyleSheet,
Text,
View,

View File

@ -16,9 +16,9 @@
'use strict';
var React = require('react-native');
var StyleSheet = require('StyleSheet');
var {
MapView,
StyleSheet,
Text,
TextInput,
View,

View File

@ -6,12 +6,14 @@
'use strict';
var React = require('React');
var {
StyleSheet,
View,
} = React;
var StyleSheet = require('StyleSheet');
var TimerMixin = require('react-timer-mixin');
var UIExplorerBlock = require('UIExplorerBlock');
var UIExplorerPage = require('UIExplorerPage');
var View = require('View');
var UIExplorerBlock = require('./UIExplorerBlock');
var UIExplorerPage = require('./UIExplorerPage');
var TransformExample = React.createClass({

View File

@ -17,14 +17,16 @@
'use strict';
var React = require('react-native');
var Dimensions = require('Dimensions');
var DrawerLayoutAndroid = require('DrawerLayoutAndroid');
var ToolbarAndroid = require('ToolbarAndroid');
var UIExplorerList = require('./UIExplorerList');
var {
Dimensions,
StyleSheet,
View,
} = React;
var UIExplorerList = require('./UIExplorerList');
// TODO: these should be exposed by the 'react-native' module.
var DrawerLayoutAndroid = require('DrawerLayoutAndroid');
var ToolbarAndroid = require('ToolbarAndroid');
var DRAWER_WIDTH_LEFT = 56;

View File

@ -21,6 +21,7 @@ var {
ListView,
PixelRatio,
Platform,
Settings,
StyleSheet,
Text,
TextInput,
@ -29,7 +30,6 @@ var {
} = React;
var { TestModule } = React.addons;
var Settings = require('Settings');
import type { ExampleModule } from 'ExampleTypes';

View File

@ -16,7 +16,6 @@
'use strict';
var React = require('react-native');
var StyleSheet = require('StyleSheet');
var {
StyleSheet,
Text,

View File

@ -42,11 +42,14 @@ var ReactNative = Object.assign(Object.create(require('React')), {
WebView: require('WebView'),
// APIs
ActionSheetIOS: require('ActionSheetIOS'),
AdSupportIOS: require('AdSupportIOS'),
AlertIOS: require('AlertIOS'),
AppRegistry: require('AppRegistry'),
AppStateIOS: require('AppStateIOS'),
AsyncStorage: require('AsyncStorage'),
CameraRoll: require('CameraRoll'),
Dimensions: require('Dimensions'),
ImagePickerIOS: require('ImagePickerIOS'),
InteractionManager: require('InteractionManager'),
LayoutAnimation: require('LayoutAnimation'),
@ -55,6 +58,7 @@ var ReactNative = Object.assign(Object.create(require('React')), {
PanResponder: require('PanResponder'),
PixelRatio: require('PixelRatio'),
PushNotificationIOS: require('PushNotificationIOS'),
Settings: require('Settings'),
StatusBarIOS: require('StatusBarIOS'),
StyleSheet: require('StyleSheet'),
VibrationIOS: require('VibrationIOS'),