Skip to content

Updated CLI documentation after behavior changes in run command #2435

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

Merged
merged 3 commits into from
Jan 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions docs/man_pages/project/testing/build-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ Command | Description
[emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator.
[emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator.
[emulate](emulate.html) | You must run the emulate command with a related command.
[livesync](livesync.html) | Synchronizes the latest changes in your project to devices.
[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator.
[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices.
[run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured.
[run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured.
[run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform.
Expand Down
3 changes: 0 additions & 3 deletions docs/man_pages/project/testing/build-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ Command | Description
[emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator.
[emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator.
[emulate](emulate.html) | You must run the emulate command with a related command.
[livesync](livesync.html) | Synchronizes the latest changes in your project to devices.
[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator.
[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices.
[run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured.
[run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured.
[run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform.
Expand Down
3 changes: 0 additions & 3 deletions docs/man_pages/project/testing/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ Command | Description
[emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator.
[emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator.
[emulate](emulate.html) | You must run the emulate command with a related command.
[livesync](livesync.html) | Synchronizes the latest changes in your project to devices.
[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator.
[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices.
[run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured.
[run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured.
[run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform.
Expand Down
21 changes: 5 additions & 16 deletions docs/man_pages/project/testing/debug-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,31 @@ Usage | Synopsis
Deploy on device, run the app start Chrome DevTools, and attach the debugger | `$ tns debug android`
Deploy on device, run the app and stop at the first code statement | `$ tns debug android --debug-brk [--device <Device ID>] [--debug-port <port>] [--timeout <timeout>]`
Deploy in the native emulator, run the app and stop at the first code statement | `$ tns debug android --debug-brk --emulator [<Emulator Options>] [--timeout <timeout>]`
Deploy in Genymotion, run the app and stop at the first code statement | `$ tns debug android --debug-brk --geny <Geny Name> [--timeout <timeout>]`
Attach the debug tools to a running app on device | `$ tns debug android --start [--device <Device ID>] [--debug-port <port>] [--timeout <timeout>]`
Attach the debug tools to a running app in the native emulator | `$ tns debug android --start --emulator [<Emulator Options>] [--timeout <timeout>]`
Attach the debug tools to a running app in Genymotion | `$ tns debug android --start --geny <Geny Name> [--print-app-output] [--timeout <timeout>]`
Livesync on device, run the app start Chrome DevTools, and attach the debugger | `$ tns debug android --no-rebuild`
Livesync on device, run the app and stop at the first code statement | `$ tns debug android --no-rebuild --debug-brk [--device <Device ID>] [--debug-port <port>] [--timeout <timeout>]`
Livesync in the native emulator, run the app and stop at the first code statement | `$ tns debug android --no-rebuild --debug-brk --emulator [<Emulator Options>] [--timeout <timeout>]`
Livesync in Genymotion, run the app and stop at the first code statement | `$ tns debug android --no-rebuild --debug-brk --geny <Geny Name> [--timeout <timeout>]`
Livesync on device/emulator, run the app, start and attach the debugger. Refresh everything automatically upon changes | `$ tns debug android --watch [--debug-brk]`
Detach the debug tools | `$ tns debug android --stop`

Debugs your project on a connected device, in a native emulator or in Genymotion.
Prepares, builds and deploys the project when necessary. Debugs your project on a connected device or emulator.
While debugging, 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
* `--device` - Specifies a connected device on which to debug the app.
* `--emulator` - Specifies that you want to debug the app in the native Android emulator from the Android SDK.
* `--geny` - Specifies a Genymotion emulator on which you want to debug your app.
* `--debug-brk` - Prepares, builds and deploys the application package on a device or in an emulator, launches the Chrome DevTools of your Chrome browser and stops at the first code statement.
* `--start` - Attaches the debug tools to a deployed and running app.
* `--stop` - Detaches the debug tools.
* `--debug-port` - Sets a new port on which to attach the debug tools.
* `--timeout` - Sets the number of seconds that the NativeScript CLI will wait for the debugger to boot. If not set, the default timeout is 90 seconds.
* `--no-rebuild` - Livesyncs to device/emulator when possible. Otherwise builds and deploys the application.
* `--watch` - If set, when you save changes to the project, changes are automatically synchronized to the connected device and the debugger is restarted. This option is available only when using `--no-rebuild`.
* `--no-watch` - If set, changes in your code will not be reflected during the execution of this command.
* `--clean` - If set, forces rebuilding the native application.

### Attributes
* `<Device ID>` is the index or name of the target device as listed by `$ tns device`
* `<Port>` is an accessible port on the device to which you want to attach the debugging tools.
* `<Emulator Options>` is any valid combination of options as listed by `$ tns help emulate android`
* `<GenyName>` is the name of the Genymotion virtual device that you want to use as listed by `$ genyshell -c "devices list"`

<% if(isHtml) { %>
###Prerequisites
### Prerequisites

* You must have Chrome installed on your system.<br/>If you are using a non-standard named Chrome app on an OS X system (for example, a nightly Canary update), you need to set this name in the `ANDROID_DEBUG_UI_MAC` setting in the NativeScript [config.json](file:///<%= #{config.getConfigPath(config)} %>).

Expand All @@ -55,9 +47,6 @@ Command | Description
[emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator.
[emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator.
[emulate](emulate.html) | You must run the emulate command with a related command.
[livesync](livesync.html) | Synchronizes the latest changes in your project to devices.
[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator.
[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices.
[run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured.
[run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured.
[run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform.
Expand Down
17 changes: 6 additions & 11 deletions docs/man_pages/project/testing/debug-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,24 @@ Deploy on device, run the app and stop at the first code statement | `$ tns debu
Deploy in the iOS Simulator, run the app and stop at the first code statement | `$ tns debug ios --debug-brk --emulator [<Emulator Options>] [--no-client]`
Attach the debug tools to a running app on device | `$ tns debug ios --start [--device <Device ID>] [--no-client]`
Attach the debug tools to a running app in the iOS Simulator | `$ tns debug ios --start --emulator [<Emulator Options>] [--no-client]`
Livesync on device, run the app, start Safari Web Inspector and attach the debugger | `$ tns debug ios --no-rebuild`
Livesync on device, run the app and stop at the first code statement | `$ tns debug ios --no-rebuild --debug-brk [--device <Device ID>] [--no-client]`
Livesync in the iOS Simulator, run the app and stop at the first code statement | `$ tns debug ios --no-rebuild --debug-brk --emulator [<Emulator Options>] [--no-client]`
Livesync on device/simulator, run the app, start and attach the debugger. Refresh everything automatically upon changes | `$ tns debug ios --watch [--debug-brk]`

Debugs your project on a connected device or in the iOS Simulator. <% if(isHtml) { %>Any debugging traffic is forwarded on port 8080 from the device to the local machine.<% } %>
Prepares, builds and deploys the project when necessary. Debugs your project on a connected device or in the iOS Simulator. <% if(isHtml) { %>Any debugging traffic is forwarded on port 8080 from the device to the local machine.<% } %>
While debugging, 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.

<% if(isConsole && (isWindows || isLinux)) { %>WARNING: You can run this command only on OS X systems. To view the complete help for this command, run `$ tns help debug ios`<% } %>

<% if((isConsole && isMacOS) || isHtml) { %>
<% if(isHtml) { %>> <% } %>IMPORTANT: Before building for iOS device, verify that you have configured a valid pair of certificate and provisioning profile on your OS X system. <% if(isHtml) { %>For more information, see [Obtaining Signing Identities and Downloading Provisioning Profiles](https://developer.apple.com/library/mac/recipes/xcode_help-accounts_preferences/articles/obtain_certificates_and_provisioning_profiles.html).<% } %>

### Options
* `--device` - Specifies a connected device on which to run the app.
* `--emulator` - Indicates that you want to debug your app in the iOS simulator.
* `--debug-brk` - Prepares, builds and deploys the application package on a device or in an emulator, runs the app, launches the developer tools of your Safari browser and stops at the first code statement.
* `--start` - Attaches the debug tools to a deployed and running app and launches the developer tools of your Safari browser.
* `--emulator` - Indicates that you want to debug your app in the iOS simulator.
* `--no-client` - If set, the NativeScript CLI attaches the debug tools but does not launch the developer tools in Safari.
* `--timeout` - Sets the number of seconds that NativeScript CLI will wait for the debugger to boot. If not set, the default timeout is 90 seconds.
* `--no-rebuild` - Livesyncs to device/emulator when possible. Otherwise builds and deploys the application.
* `--watch` - If set, when you save changes to the project, changes are automatically synchronized to the connected device and the debugger is restarted. This option is available only when using `--no-rebuild`.
* `--no-watch` - If set, changes in your code will not be reflected during the execution of this command.
* `--clean` - If set, forces rebuilding the native application.

### Attributes
* `<Device ID>` is the index or name of the target device as listed by `$ tns device`
Expand Down Expand Up @@ -55,9 +53,6 @@ Command | Description
[emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator.
[emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator.
[emulate](emulate.html) | You must run the emulate command with a related command.
[livesync](livesync.html) | Synchronizes the latest changes in your project to devices.
[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator.
[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices.
[run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured.
[run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured.
[run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform.
Expand Down
7 changes: 2 additions & 5 deletions docs/man_pages/project/testing/debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Usage | Synopsis
---|---
<% if((isConsole && isMacOS) || isHtml) { %>General | `$ tns debug <Platform>`<% } %><% if(isConsole && (isLinux || isWindows)) { %>General | `$ tns debug android`<% } %>

Debugs your project on a connected device or in a native emulator. <% if(isMacOS) { %>You must specify the target platform on which you want to debug.<% } %>
Debugs your project on a connected device or in a native emulator. <% if(isMacOS) { %>You must specify the target platform on which you want to debug.<% } %> The command will prepare, build and deploy the app when necessary. By default listens for changes in your code, synchronizes those changes and refreshes the selected device.

<% if((isConsole && isMacOS) || isHtml) { %>### Attributes
`<Platform>` is the target mobile platform for which you want to debug your project. You can set the following target platforms.
* `android` - Debugs your project on a connected Android device, native Android emulator or Genymotion emulator.
* `android` - Debugs your project on a connected Android device or Android emulator.
* `ios` - Debugs your project on a connected iOS device or in a native iOS emulator.<% } %>

<% if(isHtml) { %>
Expand All @@ -30,9 +30,6 @@ Command | Description
[emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator.
[emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator.
[emulate](emulate.html) | You must run the emulate command with a related command.
[livesync](livesync.html) | Synchronizes the latest changes in your project to devices.
[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator.
[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices.
[run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured.
[run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured.
[run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform.
Expand Down
7 changes: 2 additions & 5 deletions docs/man_pages/project/testing/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Usage | Synopsis
Deploy on Android | `$ tns deploy android [--device <Device ID>] [--key-store-path <File Path> --key-store-password <Password> --key-store-alias <Name> --key-store-alias-password <Password>] [--release]`
<% if(isMacOS) { %>Deploy on iOS | `$ tns deploy ios [--device <Device ID>] [--release]`<% } %>

Builds and deploys the project to a connected physical or virtual device. <% if(isMacOS) { %>You must specify the target platform on which you want to deploy.<% } %>
Prepares, builds and deploys the project to a connected physical or virtual device. <% if(isMacOS) { %>You must specify the target platform on which you want to deploy.<% } %> It will deploy the app on all connected devices targeting the selected platform.

<% if(isMacOS) { %>
<% if(isHtml) { %>> <% } %>IMPORTANT: Before building for iOS device, verify that you have configured a valid pair of certificate and provisioning profile on your OS X system. <% if(isHtml) { %>For more information, see [Obtaining Signing Identities and Downloading Provisioning Profiles](https://developer.apple.com/library/mac/recipes/xcode_help-accounts_preferences/articles/obtain_certificates_and_provisioning_profiles.html).<% } %>
Expand All @@ -24,7 +24,7 @@ Builds and deploys the project to a connected physical or virtual device. <% if(
* `--key-store-alias-password` - Provides the password for the alias specified with `--key-store-alias-password`. You can use the `--key-store-*` options along with `--release` to produce a signed release build. You need to specify all `--key-store-*` options.

### Attributes
* `<Device ID>` is the index or name of the target device as listed by `$ tns device`
* `<Device ID>` is the index or name of the target device as listed by `$ tns devices`

<% if(isHtml) { %>
### Command Limitations
Expand All @@ -47,9 +47,6 @@ Command | Description
[emulate android](emulate-android.html) | Builds the specified project and runs it in a native Android emulator.
[emulate ios](emulate-ios.html) | Builds the specified project and runs it in the native iOS Simulator.
[emulate](emulate.html) | You must run the emulate command with a related command.
[livesync](livesync.html) | Synchronizes the latest changes in your project to devices.
[livesync ios](livesync-ios.html) | Synchronizes the latest changes in your project to iOS devices or the iOS Simulator.
[livesync android](livesync-android.html) | Synchronizes the latest changes in your project to Android devices.
[run android](run-android.html) | Runs your project on a connected Android device or in a native Android emulator, if configured.
[run ios](run-ios.html) | Runs your project on a connected iOS device or in the iOS Simulator, if configured.
[run](run.html) | Runs your project on a connected device or in the native emulator for the selected platform.
Expand Down
Loading