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: add watchModeCommandParams to react-native.config.js #1937

Conversation

szymonrybczak
Copy link
Collaborator

Summary:

Closes #1872

Add watchModeCommandParams to configure run-ios or run-android commands when pressing i or a inside terminal in watch mode.

Test Plan:

  1. Clone the repository and do all the required steps from the Contributing guide
  2. Edit react-native.config.js inside project to look something like this:
module.exports = {
  project: {
    ios: {
      watchModeCommandParams: ['--mode', 'Release'],
    },
    android: {
      watchModeCommandParams: ['--mode', 'Release'],
    },
  },
};
  1. Run this command:
node /path/to/react-native-cli/packages/cli/build/bin.js start
  1. Press i inside terminal and the comand npx react-native run-ios --mode Release should be run.
  2. Press a inside terminal and the comand npx react-native run-android --mode Release should be run.

@github-actions github-actions bot added docs Documentation change feature labels May 15, 2023
Copy link

@brianangulo brianangulo left a comment

Choose a reason for hiding this comment

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

Thank you!

@adamTrz adamTrz merged commit 748a62d into react-native-community:main May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation change feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make watchMode commands/options configurable
3 participants