Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): auto enable --dev-client in npx expo start #22926

Merged
merged 5 commits into from Jun 21, 2023

Conversation

EvanBacon
Copy link
Contributor

Why

Test Plan

  • Added basic option tests.
  • Updated the docs.

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Jun 15, 2023
EvanBacon and others added 2 commits June 15, 2023 18:09
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Jun 15, 2023
| <kbd>M</kbd> | Open the dev menu on any connected native device (web not supported). |
| <kbd>Shift</kbd> + <kbd>M</kbd> | Choose more commands to trigger on connected devices.<br/>This includes toggling the performance monitor, opening the element inspector, reloading the device, and opening the dev menu. |
| <kbd>J</kbd> | Open Chrome Dev Tools for any connected device that is using Hermes as the JavaScript engine. [Learn more](/guides/using-hermes#javascript-inspector-for-hermes). |
| <kbd>O</kbd> | Open project code in your editor. This can be configured with the `EXPO_EDITOR` and `EDITOR` [environment variables](#environment-variables). |
| <kbd>E</kbd> | Show the development server URL as a QR code in the terminal. |
| <kbd>?</kbd> | Show all Terminal UI commands. |

### Launch target

The `npx expo start` command will automatically launch the app in Expo Go unless `expo-dev-client` in installed in the project, in which case it will open in the custom app. You can force the launch target by passing the `--dev-client` and `--go` flags. For example, running `npx expo start --go` will always launch the app in Expo Go, and `npx expo start --dev-client` will always attempt to launch the app in a development build.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the case this doesn't handle is a native app without expo-dev-client. npx expo start in a react-native app w/ ios and android directories probably shouldn't default to expo go

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's fine for now as this is the existing behavior and we don't break anything by merging new functionality for a different case. If users are doing development in an unintended way, then they may need to pass an additional flag (already the default), or switch the mode by pressing s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants