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

Plamen5kov/move emulate to run #2647

Merged
merged 2 commits into from
Mar 28, 2017
Merged

Conversation

Plamen5kov
Copy link
Contributor

do not merge before: telerik/mobile-cli-lib#918

What does this PR do?

  • deprecating emulate command (warning to use run command instead)
  • updated docs/help
  • used introduced function to start emulators/simulators if necessary and whole logic for starting emulators is there

related issue: #2349

@@ -10,19 +10,20 @@ Start an emulator and run the app inside it | `$ tns run android --emulator [<Em
Runs your project on a connected Android device or in a native Android emulator, if configured. This is shorthand for prepare, build and deploy. While your app is running, prints the output from the application in the console and watches for changes in your code. Once a change is detected, it synchronizes the change with all selected devices and restarts/refreshes the application.

### Options
* `--available-devices` - Shows a list of available emulators to be started and a list of already connected devices.
Copy link
Contributor

Choose a reason for hiding this comment

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

this is very very weird to me? So you're telling me I have to run tns run android --available-devices to get the available devices and not run the android app?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The emulate command had this behavior, and we decided to move the functionality to the run command. If it were up to me, I'd advise the user to use tns device command.

Copy link
Contributor

Choose a reason for hiding this comment

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

who are we then?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @yyosifov, --available-devices should be removed, and users should use tns devices instead. IF you think it would affect users, then put a to-be-deprecated message when --available-devices is used so we can remove it in a following release.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, no problem. Will move the functionality to the tns device command.

@@ -10,19 +10,20 @@ Start an emulator and run the app inside it | `$ tns run android --emulator [<Em
Runs your project on a connected Android device or in a native Android emulator, if configured. This is shorthand for prepare, build and deploy. While your app is running, prints the output from the application in the console and watches for changes in your code. Once a change is detected, it synchronizes the change with all selected devices and restarts/refreshes the application.

### Options
* `--available-devices` - Shows a list of available emulators to be started and a list of already connected devices.
* `--device` - Specifies a connected device/emulator to start and run the app.
* `--emulator` - If set, runs the app in all available and configured android emulators. It will start an emulator if none are already running.
Copy link
Contributor

Choose a reason for hiding this comment

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

what does "runs the app in all available and configured android emulators"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

runs app on all running emulators

* `--available-devices` - Shows a list of available emulators to be started and a list of already connected devices.
* `--device` - Specifies a connected device/emulator to start and run the app.
* `--emulator` - If set, runs the app in all available and configured android emulators. It will start an emulator if none are already running.
* `--justlaunch` - If set, does not print the application output in the console.
Copy link
Contributor

Choose a reason for hiding this comment

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

besides that, this works for both emulator on device right?

I'd suggest: "--justlaunch - when specified starts the application on the emulator/device and omits all the application output in the console"

Copy link
Contributor Author

@Plamen5kov Plamen5kov Mar 24, 2017

Choose a reason for hiding this comment

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

besides that, this works for both emulator on device right?

this?

  • the --device flag works with emulators/simulators/real devices
  • the --emulator flag works only with emulators/simulators

--justlaunch doesn't start the application, it only cuts off the console, once the application is running.

Copy link
Contributor

Choose a reason for hiding this comment

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

That sounds strange to me. My doubt would be what exactly am I launching? Anyway, you can leave it as is for now.

@Plamen5kov Plamen5kov force-pushed the plamen5kov/move_emulate_to_run branch 4 times, most recently from 54d483d to ba97795 Compare March 28, 2017 08:53
updated submodule
* happy path for android
* added comments
* fixed tests
* fixed emulator by index
* call start simulator with id

updated docs

remove commet

removed comment

updated submodule

added message depricating the emulate command

removed tns devices file and added option available-devices to common lib

updated docs

updated submodule

returned starting of emulators to device-service to keep general behavior for all commands using the device

updated submodule (reverted tests/refactoring after review)

updated submodule (renamings/typo)

update submodule (refactoring after review)
@Plamen5kov Plamen5kov force-pushed the plamen5kov/move_emulate_to_run branch from ba97795 to b7ea4fd Compare March 28, 2017 10:09
@Plamen5kov Plamen5kov merged commit 2f3878d into master Mar 28, 2017
@Plamen5kov Plamen5kov deleted the plamen5kov/move_emulate_to_run branch March 28, 2017 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants