Skip to content

Allow packager to be opened in specific terminal on Linux and Mac OS X - #13065

Closed
smvv wants to merge 1 commit into
react:masterfrom
smvv:open-packager-in-specific-terminal
Closed

smvv wants to merge 1 commit into
react:masterfrom
smvv:open-packager-in-specific-terminal

Conversation

@smvv

@smvv smvv commented Mar 21, 2017

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please read these instructions carefully:

  • Explain the motivation for making this change.
  • Provide a test plan demonstrating that the code is solid.
  • Match the code formatting of the rest of the codebase.
  • Target the master branch, NOT a "stable" branch.

Motivation (required)

What existing problem does the pull request solve?

Currently, it is not possible to spawn the packager in a specific terminal on Linux and Mac OS X.

For example, after applying this patch, starting the packager in a new xfce terminal on Linux can be
done using:

react-native run-android --terminal /usr/bin/xfce4-terminal

When the command is ran a second time, and the terminal is still running, the command will not spawn a new terminal for the packager.

The option 'open' is renamed to 'terminal' for consistency. Note that the option 'open' was never exposed to the CLI though.

Test Plan (required)

A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website. See What is a Test Plan? to learn more.

If you have added code that should be tested, add tests.

See command above.

Next Steps

Sign the CLA, if you haven't already.

Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

Make sure all tests pass on both Travis and Circle CI. PRs that break tests are unlikely to be merged.

For more info, see the "Pull Requests" section of our "Contributing" guidelines.

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. GH Review: review-needed labels Mar 21, 2017
@hramos
hramos requested a review from grabbou April 27, 2017 17:20
@grabbou

grabbou commented Apr 28, 2017

Copy link
Copy Markdown
Contributor

Note that the option 'open' was never exposed to the CLI though.

Nice finding!

Comment thread local-cli/runAndroid/runAndroid.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we use env variable for consistency with other places where we already use it?

Example: https://github.com/facebook/react-native/blob/dfaa03e1cb12b349152ca10f997ac198ab995d1e/local-cli/server/util/launchEditor.js#L84

REACT_TERMINAL or something might be a good idea for future scripts

@grabbou

grabbou commented Apr 28, 2017

Copy link
Copy Markdown
Contributor

Overall looks good! Thanks for submitting. Just left a quick question (to consider). Let me know what you think :)

@hramos

hramos commented Aug 4, 2017

Copy link
Copy Markdown
Contributor

Still interested in landing this?

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@smvv I tried to find reviewers for this pull request and wanted to ping them to take another look. However, based on the blame information for the files in this pull request I couldn't find any reviewers. This sometimes happens when the files in the pull request are new or don't exist on master anymore. Is this pull request still relevant? If yes could you please rebase? In case you know who has context on this code feel free to mention them in a comment (one person is fine). Thanks for reading and hope you will continue contributing to the project.

For example, starting the packager in a new xfce terminal on Linux can be
done using:

    react-native run-android REACT_TERMINAL=/usr/bin/xfce4-terminal

When the command is ran a second time, and the terminal is still
running, the command will not spawn a new terminal for the packager.
@smvv
smvv force-pushed the open-packager-in-specific-terminal branch from 8d0e4f0 to 9b88b1a Compare August 22, 2017 17:56
@smvv

smvv commented Aug 22, 2017

Copy link
Copy Markdown
Contributor Author

@hramos I've updated the commit with the requested changes, and rebased on top of master.

@facebook-github-bot facebook-github-bot added GH Review: accepted Import Started This pull request has been imported. This does not imply the PR has been approved. and removed GH Review: review-needed labels Aug 24, 2017
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@hramos has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

grabbou pushed a commit to react-native-community/cli that referenced this pull request Sep 26, 2018
Summary:
Thanks for submitting a PR! Please read these instructions carefully:

- [ ] Explain the **motivation** for making this change.
- [ ] Provide a **test plan** demonstrating that the code is solid.
- [ ] Match the **code formatting** of the rest of the codebase.
- [ ] Target the `master` branch, NOT a "stable" branch.

What existing problem does the pull request solve?

Currently, it is not possible to spawn the packager in a specific terminal on Linux and Mac OS X.

For example, after applying this patch, starting the packager in a new xfce terminal on Linux can be
done using:

    react-native run-android --terminal /usr/bin/xfce4-terminal

When the command is ran a second time, and the terminal is still running, the command will not spawn a new terminal for the packager.

The option 'open' is renamed to 'terminal' for consistency. Note that the option 'open' was never exposed to the CLI though.

A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website. See [What is a Test Plan?][1] to learn more.

If you have added code that should be tested, add tests.

See command above.

Sign the [CLA][2], if you haven't already.

Small pull requests are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

Make sure all **tests pass** on both [Travis][3] and [Circle CI][4]. PRs that break tests are unlikely to be merged.

For more info, see the ["Pull Requests"][5] section of our "Contributing" guidelines.

[1]: https://medium.com/martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9
[2]: https://code.facebook.com/cla
[3]: https://travis-ci.org/facebook/react-native
[4]: http://circleci.com/gh/facebook/react-native
[5]: https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#pull-requests
Closes react/react-native#13065

Differential Revision: D5700713

Pulled By: hramos

fbshipit-source-id: d9729a484c0c0e8f95edabe4309ed7800c9a9c14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Import Started This pull request has been imported. This does not imply the PR has been approved.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants