diff --git a/ContainerShip/scripts/run-ci-e2e-tests.sh b/ContainerShip/scripts/run-ci-e2e-tests.sh index e19fa5868d3cd2..de2b97edb5bb7a 100755 --- a/ContainerShip/scripts/run-ci-e2e-tests.sh +++ b/ContainerShip/scripts/run-ci-e2e-tests.sh @@ -230,13 +230,13 @@ function e2e_suite() { # js tests if [ $RUN_JS -ne 0 ]; then # Check the packager produces a bundle (doesn't throw an error) - react-native bundle --max-workers 1 --platform android --dev true --entry-file index.android.js --bundle-output android-bundle.js + react-native bundle --max-workers 1 --platform android --dev true --entry-file index.js --bundle-output android-bundle.js if [ $? -ne 0 ]; then echo "Could not build android bundle" return 1 fi - react-native bundle --max-workers 1 --platform ios --dev true --entry-file index.ios.js --bundle-output ios-bundle.js + react-native bundle --max-workers 1 --platform ios --dev true --entry-file index.js --bundle-output ios-bundle.js if [ $? -ne 0 ]; then echo "Could not build iOS bundle" return 1 diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md index ea74edad0b4aa5..3805e84ef5e5aa 100644 --- a/docs/GettingStarted.md +++ b/docs/GettingStarted.md @@ -583,12 +583,12 @@ Now that you have successfully run the app, let's modify it. -- Open `index.ios.js` in your text editor of choice and edit some lines. +- Open `index.js` in your text editor of choice and edit some lines. - Hit `⌘R` in your iOS Simulator to reload the app and see your changes! -- Open `index.android.js` in your text editor of choice and edit some lines. +- Open `index.js` in your text editor of choice and edit some lines. - Press the `R` key twice or select `Reload` from the Developer Menu (`⌘M`) to see your changes! @@ -597,7 +597,7 @@ Now that you have successfully run the app, let's modify it. Now that you have successfully run the app, let's modify it. -- Open `index.android.js` in your text editor of choice and edit some lines. +- Open `index.js` in your text editor of choice and edit some lines. - Press the `R` key twice or select `Reload` from the Developer Menu (`⌘M`) to see your changes! diff --git a/docs/IntegrationWithExistingApps.md b/docs/IntegrationWithExistingApps.md index a5e0b337b0afd4..833e392384480f 100644 --- a/docs/IntegrationWithExistingApps.md +++ b/docs/IntegrationWithExistingApps.md @@ -292,15 +292,15 @@ Now we will actually modify the native iOS application to integrate React Native The first bit of code we will write is the actual React Native code for the new "High Score" screen that will be integrated into our application. -##### 1. Create a `index.ios.js` file +##### 1. Create a `index.js` file -First, create an empty `index.ios.js` file in the root of your React Native project. +First, create an empty `index.js` file in the root of your React Native project. -`index.ios.js` is the starting point for React Native applications on iOS, and it is always required. It can be a small file that `require`s other file that are part of your React Native component or application, or it can contain all the code that is needed for it. In our case, we will just put everything in `index.ios.js`. +`index.js` is the starting point for React Native applications, and it is always required. It can be a small file that `require`s other file that are part of your React Native component or application, or it can contain all the code that is needed for it. In our case, we will just put everything in `index.js`. ##### 2. Add your React Native code -In your `index.ios.js`, create your component. In our sample here, we will add simple `` component within a styled `` +In your `index.js`, create your component. In our sample here, we will add simple `` component within a styled `` ```javascript 'use strict'; @@ -358,7 +358,7 @@ AppRegistry.registerComponent('MyReactNativeApp', () => RNHighScores); #### The Magic: `RCTRootView` -Now that your React Native component is created via `index.ios.js`, you need to add that component to a new or existing `ViewController`. The easiest path to take is to optionally create an event path to your component and then add that component to an existing `ViewController`. +Now that your React Native component is created via `index.js`, you need to add that component to a new or existing `ViewController`. The easiest path to take is to optionally create an event path to your component and then add that component to an existing `ViewController`. We will tie our React Native component with a new native view in the `ViewController` that will actually host it called `RCTRootView` . @@ -372,9 +372,9 @@ You can add a new link on the main game menu to go to the "High Score" React Nat We will now add an event handler from the menu link. A method will be added to the main `ViewController` of your application. This is where `RCTRootView` comes into play. -When you build a React Native application, you use the React Native packager to create an `index.ios.bundle` that will be served by the React Native server. Inside `index.ios.bundle` will be our `RNHighScore` module. So, we need to point our `RCTRootView` to the location of the `index.ios.bundle` resource (via `NSURL`) and tie it to the module. +When you build a React Native application, you use the React Native packager to create an `index.bundle` that will be served by the React Native server. Inside `index.bundle` will be our `RNHighScore` module. So, we need to point our `RCTRootView` to the location of the `index.bundle` resource (via `NSURL`) and tie it to the module. -We will, for debugging purposes, log that the event handler was invoked. Then, we will create a string with the location of our React Native code that exists inside the `index.ios.bundle`. Finally, we will create the main `RCTRootView`. Notice how we provide `RNHighScores` as the `moduleName` that we created [above](#the-react-native-component) when writing the code for our React Native component. +We will, for debugging purposes, log that the event handler was invoked. Then, we will create a string with the location of our React Native code that exists inside the `index.bundle`. Finally, we will create the main `RCTRootView`. Notice how we provide `RNHighScores` as the `moduleName` that we created [above](#the-react-native-component) when writing the code for our React Native component. @@ -389,7 +389,7 @@ First `import` the `RCTRootView` header. ```objectivec - (IBAction)highScoreButtonPressed:(id)sender { NSLog(@"High Score Button Pressed"); - NSURL *jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios"]; + NSURL *jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.bundle?platform=ios"]; RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL: jsCodeLocation @@ -429,7 +429,7 @@ import React ```swift @IBAction func highScoreButtonTapped(sender : UIButton) { NSLog("Hello") - let jsCodeLocation = URL(string: "http://localhost:8081/index.ios.bundle?platform=ios") + let jsCodeLocation = URL(string: "http://localhost:8081/index.bundle?platform=ios") let mockData:NSDictionary = ["scores": [ ["name":"Alex", "value":"42"], @@ -471,7 +471,7 @@ Wire up the new link in the main menu to the newly added event handler method. ### Test your integration -You have now done all the basic steps to integrate React Native with your current application. Now we will start the React Native packager to build the `index.ios.bundle` package and the server running on `localhost` to serve it. +You have now done all the basic steps to integrate React Native with your current application. Now we will start the React Native packager to build the `index.bundle` package and the server running on `localhost` to serve it. ##### 1. Add App Transport Security exception @@ -586,15 +586,15 @@ Now we will actually modify the native Android application to integrate React Na The first bit of code we will write is the actual React Native code for the new "High Score" screen that will be integrated into our application. -##### 1. Create a `index.android.js` file +##### 1. Create a `index.js` file -First, create an empty `index.android.js` file in the root of your React Native project. +First, create an empty `index.js` file in the root of your React Native project. -`index.android.js` is the starting point for React Native applications on Android, and it is always required. It can be a small file that `require`s other file that are part of your React Native component or application, or it can contain all the code that is needed for it. In our case, we will just put everything in `index.android.js`. +`index.js` is the starting point for React Native applications, and it is always required. It can be a small file that `require`s other file that are part of your React Native component or application, or it can contain all the code that is needed for it. In our case, we will just put everything in `index.js`. ##### 2. Add your React Native code -In your `index.android.js`, create your component. In our sample here, we will add simple `` component within a styled ``: +In your `index.js`, create your component. In our sample here, we will add simple `` component within a styled ``: ```javascript 'use strict'; @@ -679,7 +679,7 @@ public class MyReactActivity extends Activity implements DefaultHardwareBackBtnH mReactInstanceManager = ReactInstanceManager.builder() .setApplication(getApplication()) .setBundleAssetName("index.android.bundle") - .setJSMainModuleName("index.android") + .setJSMainModuleName("index") .addPackage(new MainReactPackage()) .setUseDeveloperSupport(BuildConfig.DEBUG) .setInitialLifecycleState(LifecycleState.RESUMED) @@ -696,7 +696,7 @@ public class MyReactActivity extends Activity implements DefaultHardwareBackBtnH } ``` -> If you are using a starter kit for React Native, replace the "HelloWorld" string with the one in your index.android.js file (it’s the first argument to the `AppRegistry.registerComponent()` method). +> If you are using a starter kit for React Native, replace the "HelloWorld" string with the one in your index.js file (it’s the first argument to the `AppRegistry.registerComponent()` method). If you are using Android Studio, use `Alt + Enter` to add all missing imports in your MyReactActivity class. Be careful to use your package’s `BuildConfig` and not the one from the `...facebook...` package. @@ -775,7 +775,7 @@ Now your activity is ready to run some JavaScript code. ### Test your integration -You have now done all the basic steps to integrate React Native with your current application. Now we will start the React Native packager to build the `index.android.bundle` package and the server running on localhost to serve it. +You have now done all the basic steps to integrate React Native with your current application. Now we will start the React Native packager to build the `index.bundle` package and the server running on localhost to serve it. ##### 1. Run the packager @@ -798,7 +798,7 @@ Once you reach your React-powered activity inside the app, it should load the Ja You can use Android Studio to create your release builds too! It’s as easy as creating release builds of your previously-existing native Android app. There’s just one additional step, which you’ll have to do before every release build. You need to execute the following to create a React Native bundle, which will be included with your native Android app: ``` -$ react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/com/your-company-name/app-package-name/src/main/assets/index.android.bundle --assets-dest android/com/your-company-name/app-package-name/src/main/res/ +$ react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/com/your-company-name/app-package-name/src/main/assets/index.android.bundle --assets-dest android/com/your-company-name/app-package-name/src/main/res/ ``` > Don’t forget to replace the paths with correct ones and create the assets folder if it doesn’t exist. diff --git a/docs/Tutorial.md b/docs/Tutorial.md index e5130d52613dc2..c80b6b40643bd2 100644 --- a/docs/Tutorial.md +++ b/docs/Tutorial.md @@ -19,7 +19,7 @@ In accordance with the ancient traditions of our people, we must first build an ```ReactNativeWebPlayer import React, { Component } from 'react'; -import { AppRegistry, Text } from 'react-native'; +import { Text } from 'react-native'; export default class HelloWorldApp extends Component { render() { @@ -28,12 +28,9 @@ export default class HelloWorldApp extends Component { ); } } - -// skip this line if using Create React Native App -AppRegistry.registerComponent('AwesomeProject', () => HelloWorldApp); ``` -If you are feeling curious, you can play around with sample code directly in the web simulators. You can also paste it into your `App.js`, `index.ios.js`, or `index.android.js` file to create a real app on your local machine. +If you are feeling curious, you can play around with sample code directly in the web simulators. You can also paste it into your `App.js` file to create a real app on your local machine. ## What's going on here? @@ -48,14 +45,6 @@ is a built-in component that just displays some text. So this code is defining `HelloWorldApp`, a new `Component`. When you're building a React Native app, you'll be making new components a lot. Anything you see on the screen is some sort of component. A component can be pretty simple - the only thing that's required is a `render` function which returns some JSX to render. - - - ## This app doesn't do very much Good point. To make components do more interesting things, you need to [learn about Props](docs/props.html). diff --git a/local-cli/generator/copyProjectTemplateAndReplace.js b/local-cli/generator/copyProjectTemplateAndReplace.js index 4d272588211ce1..5adf707037ff99 100644 --- a/local-cli/generator/copyProjectTemplateAndReplace.js +++ b/local-cli/generator/copyProjectTemplateAndReplace.js @@ -44,6 +44,8 @@ function copyProjectTemplateAndReplace(srcPath, destPath, newProjectName, option // This also includes __tests__/index.*.js if (fileName === 'index.ios.js') { return; } if (fileName === 'index.android.js') { return; } + if (fileName === 'index.js') { return; } + if (fileName === 'App.js') { return; } } const relativeFilePath = path.relative(srcPath, absoluteSrcFilePath); diff --git a/local-cli/templates/HelloNavigation/views/MainNavigator.js b/local-cli/templates/HelloNavigation/App.js similarity index 71% rename from local-cli/templates/HelloNavigation/views/MainNavigator.js rename to local-cli/templates/HelloNavigation/App.js index 949fb08a972d1d..9bd3691aa4c4e6 100644 --- a/local-cli/templates/HelloNavigation/views/MainNavigator.js +++ b/local-cli/templates/HelloNavigation/App.js @@ -9,13 +9,13 @@ import React, { Component } from 'react'; import { StackNavigator } from 'react-navigation'; -import HomeScreenTabNavigator from './HomeScreenTabNavigator'; -import ChatScreen from './chat/ChatScreen'; +import HomeScreenTabNavigator from './views/HomeScreenTabNavigator'; +import ChatScreen from './views/chat/ChatScreen'; /** * Top-level navigator. Renders the application UI. */ -const MainNavigator = StackNavigator({ +const App = StackNavigator({ Home: { screen: HomeScreenTabNavigator, }, @@ -24,4 +24,4 @@ const MainNavigator = StackNavigator({ }, }); -export default MainNavigator; +export default App; diff --git a/local-cli/templates/HelloNavigation/index.android.js b/local-cli/templates/HelloNavigation/index.android.js deleted file mode 100644 index e9ea66bf64ba48..00000000000000 --- a/local-cli/templates/HelloNavigation/index.android.js +++ /dev/null @@ -1,5 +0,0 @@ -import { AppRegistry } from 'react-native'; - -import MainNavigator from './views/MainNavigator'; - -AppRegistry.registerComponent('HelloWorld', () => MainNavigator); diff --git a/local-cli/templates/HelloNavigation/index.ios.js b/local-cli/templates/HelloNavigation/index.ios.js deleted file mode 100644 index e9ea66bf64ba48..00000000000000 --- a/local-cli/templates/HelloNavigation/index.ios.js +++ /dev/null @@ -1,5 +0,0 @@ -import { AppRegistry } from 'react-native'; - -import MainNavigator from './views/MainNavigator'; - -AppRegistry.registerComponent('HelloWorld', () => MainNavigator); diff --git a/local-cli/templates/HelloWorld/index.android.js b/local-cli/templates/HelloWorld/App.js similarity index 70% rename from local-cli/templates/HelloWorld/index.android.js rename to local-cli/templates/HelloWorld/App.js index 71e391f5366843..659579088c7134 100644 --- a/local-cli/templates/HelloWorld/index.android.js +++ b/local-cli/templates/HelloWorld/App.js @@ -6,13 +6,20 @@ import React, { Component } from 'react'; import { - AppRegistry, + Platform, StyleSheet, Text, View } from 'react-native'; -export default class HelloWorld extends Component { +const instructions = Platform.select({ + ios: 'Press Cmd+R to reload,\n' + + 'Cmd+D or shake for dev menu', + android: 'Double tap R on your keyboard to reload,\n' + + 'Shake or press menu button for dev menu', +}); + +export default class App extends Component { render() { return ( @@ -20,11 +27,10 @@ export default class HelloWorld extends Component { Welcome to React Native! - To get started, edit index.android.js + To get started, edit App.js - Double tap R on your keyboard to reload,{'\n'} - Shake or press menu button for dev menu + {instructions} ); @@ -49,5 +55,3 @@ const styles = StyleSheet.create({ marginBottom: 5, }, }); - -AppRegistry.registerComponent('HelloWorld', () => HelloWorld); diff --git a/local-cli/templates/HelloWorld/__tests__/index.ios.js b/local-cli/templates/HelloWorld/__tests__/App.js similarity index 81% rename from local-cli/templates/HelloWorld/__tests__/index.ios.js rename to local-cli/templates/HelloWorld/__tests__/App.js index ba7c5b5e1679bb..d0b9ee3165c8f4 100644 --- a/local-cli/templates/HelloWorld/__tests__/index.ios.js +++ b/local-cli/templates/HelloWorld/__tests__/App.js @@ -1,12 +1,12 @@ import 'react-native'; import React from 'react'; -import Index from '../index.ios.js'; +import App from '../App'; // Note: test renderer must be required after react-native. import renderer from 'react-test-renderer'; it('renders correctly', () => { const tree = renderer.create( - + ); }); diff --git a/local-cli/templates/HelloWorld/__tests__/index.android.js b/local-cli/templates/HelloWorld/__tests__/index.android.js deleted file mode 100644 index b49b9087f416e7..00000000000000 --- a/local-cli/templates/HelloWorld/__tests__/index.android.js +++ /dev/null @@ -1,12 +0,0 @@ -import 'react-native'; -import React from 'react'; -import Index from '../index.android.js'; - -// Note: test renderer must be required after react-native. -import renderer from 'react-test-renderer'; - -it('renders correctly', () => { - const tree = renderer.create( - - ); -}); diff --git a/local-cli/templates/HelloWorld/android/app/build.gradle b/local-cli/templates/HelloWorld/android/app/build.gradle index c46fd943932b37..ec6f3022572ae6 100644 --- a/local-cli/templates/HelloWorld/android/app/build.gradle +++ b/local-cli/templates/HelloWorld/android/app/build.gradle @@ -72,6 +72,10 @@ import com.android.build.OutputFile * ] */ +project.ext.react = [ + entryFile: "index.js" +] + apply from: "../../node_modules/react-native/react.gradle" /** diff --git a/local-cli/templates/HelloWorld/android/app/src/main/java/com/helloworld/MainApplication.java b/local-cli/templates/HelloWorld/android/app/src/main/java/com/helloworld/MainApplication.java index f04af33c5f4894..8b5a7f97bea556 100644 --- a/local-cli/templates/HelloWorld/android/app/src/main/java/com/helloworld/MainApplication.java +++ b/local-cli/templates/HelloWorld/android/app/src/main/java/com/helloworld/MainApplication.java @@ -25,6 +25,11 @@ protected List getPackages() { new MainReactPackage() ); } + + @Override + protected String getJSMainModuleName() { + return "index"; + } }; @Override diff --git a/local-cli/templates/HelloWorld/index.ios.js b/local-cli/templates/HelloWorld/index.ios.js deleted file mode 100644 index ede2dc26820362..00000000000000 --- a/local-cli/templates/HelloWorld/index.ios.js +++ /dev/null @@ -1,53 +0,0 @@ -/** - * Sample React Native App - * https://github.com/facebook/react-native - * @flow - */ - -import React, { Component } from 'react'; -import { - AppRegistry, - StyleSheet, - Text, - View -} from 'react-native'; - -export default class HelloWorld extends Component { - render() { - return ( - - - Welcome to React Native! - - - To get started, edit index.ios.js - - - Press Cmd+R to reload,{'\n'} - Cmd+D or shake for dev menu - - - ); - } -} - -const styles = StyleSheet.create({ - container: { - flex: 1, - justifyContent: 'center', - alignItems: 'center', - backgroundColor: '#F5FCFF', - }, - welcome: { - fontSize: 20, - textAlign: 'center', - margin: 10, - }, - instructions: { - textAlign: 'center', - color: '#333333', - marginBottom: 5, - }, -}); - -AppRegistry.registerComponent('HelloWorld', () => HelloWorld); diff --git a/local-cli/templates/HelloWorld/index.js b/local-cli/templates/HelloWorld/index.js new file mode 100644 index 00000000000000..2d090c1de7b1c6 --- /dev/null +++ b/local-cli/templates/HelloWorld/index.js @@ -0,0 +1,4 @@ +import { AppRegistry } from 'react-native'; +import App from './App'; + +AppRegistry.registerComponent('HelloWorld', () => App); diff --git a/local-cli/templates/HelloWorld/ios/HelloWorld/AppDelegate.m b/local-cli/templates/HelloWorld/ios/HelloWorld/AppDelegate.m index cff79affcb06e0..7807738016e386 100644 --- a/local-cli/templates/HelloWorld/ios/HelloWorld/AppDelegate.m +++ b/local-cli/templates/HelloWorld/ios/HelloWorld/AppDelegate.m @@ -18,7 +18,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( { NSURL *jsCodeLocation; - jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil]; + jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@"HelloWorld" diff --git a/scripts/android-e2e-test.js b/scripts/android-e2e-test.js index 45736c8dc9bd56..9b0f640a4aeecc 100644 --- a/scripts/android-e2e-test.js +++ b/scripts/android-e2e-test.js @@ -97,7 +97,7 @@ describe('Android Test App', function () { }); it('should have Hot Module Reloading working', function () { - const androidAppCode = fs.readFileSync('index.android.js', 'utf-8'); + const androidAppCode = fs.readFileSync('index.js', 'utf-8'); let intervalToUpdate; return driver .waitForElementByXPath('//android.widget.TextView[starts-with(@text, "Welcome to React Native!")]') @@ -111,19 +111,19 @@ describe('Android Test App', function () { // CI environment can be quite slow and we can't guarantee that it can consistently motice a file change // so we change the file every few seconds just in case intervalToUpdate = setInterval(() => { - fs.writeFileSync('index.android.js', androidAppCode.replace('Welcome to React Native!', 'Welcome to React Native with HMR!' + iteration), 'utf-8'); + fs.writeFileSync('index.js', androidAppCode.replace('Welcome to React Native!', 'Welcome to React Native with HMR!' + iteration), 'utf-8'); }, 3000); }) .waitForElementByXPath('//android.widget.TextView[starts-with(@text, "Welcome to React Native with HMR!")]') .finally(() => { clearInterval(intervalToUpdate); - fs.writeFileSync('index.android.js', androidAppCode, 'utf-8'); + fs.writeFileSync('index.js', androidAppCode, 'utf-8'); }); }); it('should have Debug In Chrome working', function () { - const androidAppCode = fs.readFileSync('index.android.js', 'utf-8'); + const androidAppCode = fs.readFileSync('index.js', 'utf-8'); // http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_MENU return driver .waitForElementByXPath('//android.widget.TextView[starts-with(@text, "Welcome to React Native!")]') diff --git a/scripts/react-native-xcode.sh b/scripts/react-native-xcode.sh index be9c75c58b1f22..79db2abd5cb9b9 100755 --- a/scripts/react-native-xcode.sh +++ b/scripts/react-native-xcode.sh @@ -49,7 +49,11 @@ cd "${REACT_NATIVE_DIR}"/../.. [ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm" # Define entry file -ENTRY_FILE=${1:-index.ios.js} +if [[ -s "index.ios.js" ]]; then + ENTRY_FILE=${1:-index.ios.js} +else + ENTRY_FILE=${1:-index.js} +fi if [[ -s "$HOME/.nvm/nvm.sh" ]]; then . "$HOME/.nvm/nvm.sh" diff --git a/scripts/run-ci-e2e-tests.js b/scripts/run-ci-e2e-tests.js index b1e093c13822c0..81d2487cafaf16 100644 --- a/scripts/run-ci-e2e-tests.js +++ b/scripts/run-ci-e2e-tests.js @@ -167,7 +167,7 @@ try { SERVER_PID = packagerProcess.pid; exec('sleep 15s'); // prepare cache to reduce chances of possible red screen "Can't fibd variable __fbBatchedBridge..." - exec('response=$(curl --write-out %{http_code} --silent --output /dev/null localhost:8081/index.ios.bundle?platform=ios&dev=true)'); + exec('response=$(curl --write-out %{http_code} --silent --output /dev/null localhost:8081/index.bundle?platform=ios&dev=true)'); echo(`Starting packager server, ${SERVER_PID}`); echo('Executing ' + iosTestType + ' e2e test'); if (tryExecNTimes( @@ -190,12 +190,12 @@ try { if (argv.js) { // Check the packager produces a bundle (doesn't throw an error) - if (exec('react-native bundle --max-workers 1 --platform android --dev true --entry-file index.android.js --bundle-output android-bundle.js').code) { + if (exec('react-native bundle --max-workers 1 --platform android --dev true --entry-file index.js --bundle-output android-bundle.js').code) { echo('Could not build Android bundle'); exitCode = 1; throw Error(exitCode); } - if (exec('react-native --max-workers 1 bundle --platform ios --dev true --entry-file index.ios.js --bundle-output ios-bundle.js').code) { + if (exec('react-native --max-workers 1 bundle --platform ios --dev true --entry-file index.js --bundle-output ios-bundle.js').code) { echo('Could not build iOS bundle'); exitCode = 1; throw Error(exitCode); diff --git a/scripts/test-manual-e2e.sh b/scripts/test-manual-e2e.sh index 7159edde7e7d51..09c73c0d9c5e90 100755 --- a/scripts/test-manual-e2e.sh +++ b/scripts/test-manual-e2e.sh @@ -98,7 +98,7 @@ info " - Disable Hot Reloading. It might be enabled from last time (the settin info " - Verify 'Reload JS' works" info " - Test Chrome debugger by adding breakpoints and reloading JS. We don't have tests for Chrome debugging." info " - Disable Chrome debugging." -info " - Enable Hot Reloading, change a file (index.ios.js, index.android.js) and save. The UI should refresh." +info " - Enable Hot Reloading, change a file (index.js) and save. The UI should refresh." info " - Disable Hot Reloading." info "" info "Press any key to open the project in Xcode"