-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add interactive mode with keyboard commands #326
Conversation
hey @fson this looks great so far! so excited for it a bit of feedback:
EDIT: nevermind the ones I crossed out, changed my mind
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, left comment without explicit review
oh, also, we should remove the ios option when you're on windows |
This is currently required for the change to take effect, see: expo/expo#413
Great suggestions, thanks for the feedback @brentvatne. I've implemented the changes. I think condensing some commands together was also a good idea, as I was a bit concerned that the instructions would not fit nicely on a single screen anymore, so I've implemented that one too (looks good IMHO). I also removed one empty line (before the "For links to install the Expo app..." line) to better fit all the information on the screen at once. Let me know what you think! |
Oops, good catch – |
@fson - two more things:
|
|
|
`npm start -- --no-interactive` runs the server without interactivity.
|
@fson - ah we don't support git bash currently, it doesn't even work with popular libs like inquirer 😊 |
@fson - just powershell and cmd.exe |
@brentvatne Ah, good |
The `readline` setup on Windows that nicely suppresses the annoying "Terminate batch job (Y/N)" prompt when pressing Ctrl+c also caused the keyboard commands on interactive mode to be printed to stdout. Fix this by piping the `readline` output to a MuteStream.
Creating the readline interface on Windows to listen for Ctrl+c caused the text "Stopping packager" to be printed twice. In the interactive mode stopping the packager is handled by the keypress listener set by the interactive mode, so the readline interface is not necessary.
I found the reason why the input characters were printed to the console on Windows and fixed it. Now the only problem seems to be the bold |
Work around the bold style not being closed on Windows by adding reset styles after each bold style.
weird! I wonder if there is a way to work around that @fson? |
I fixed the bold style overflowing to the following text by adding |
thanks @fson this looks great |
yarn start
command now startsreact-native-scripts
in an interactive mode.Supported commands: