You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `cleanupService` is used to handle actions that should be executed after CLI's process had exited. This is an internal service, that runs detached childProcess in which it executes CLI's cleanup actions once CLI is dead. As the process is detached, logs from it are not shown anywhere, so the service exposes a way to add log file in which the child process will write its logs.
1494
+
1495
+
### setCleanupLogFile
1496
+
Defines the log file location where the child cleanup process will write its logs.
1497
+
1498
+
> NOTE: You must call this method immediately after requiring NativeScript CLI. In case you call it after the cleanup process had started, it will not use the passed log file.
1499
+
1500
+
* Definition
1501
+
```TypeScript
1502
+
/**
1503
+
* Sets the file in which the cleanup process will write its logs.
1504
+
* This method must be called before starting the cleanup process, i.e. when CLI is initialized.
1505
+
* @param{string}filePath Path to file where the logs will be written. The logs are appended to the passed file.
CLI is designed as command line tool and when it is used as a library, it does not give you access to all of the methods. This is mainly implementation detail. Most of the CLI's code is created to work in command line, not as a library, so before adding method to public API, most probably it will require some modification.
1492
1519
For example the `$options` injected module contains information about all `--` options passed on the terminal. When the CLI is used as a library, the options are not populated. Before adding method to public API, make sure its implementation does not rely on `$options`.
*`--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.
27
27
*`--copy-to` - Specifies the file path where the built `.apk` will be copied. If it points to a non-existent directory path, it will be created. If the specified value is existing directory, the original file name will be used.
28
28
*`--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
29
-
*`--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. For example: `--env.uglify --env.snapshot`.
29
+
*`--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. Supported additional flags:
*`--env.snapshot`- creates [Snapshot](https://docs.nativescript.org/performance-optimizations/bundling-with-webpack#v8-heap-snapshot) (only for release builds on Mac OS & for Android).
32
+
*`--env.uglify` - provides basic obfuscation and smaller app size.
33
+
*`--env.report` - creates a Webpack report inside a `report` folder in the root folder.
*`--release` - If set, produces a release build. Otherwise, produces a debug build.
25
25
*`--for-device` - If set, produces an application package that you can deploy on device. Otherwise, produces a build that you can run only in the native iOS Simulator.
26
+
*`--i-cloud-container-environment` - If set, adds the passed `iCloudContainerEnvironment` when exporting an application package with the `--for-device` option.
26
27
*`--copy-to` - Specifies the file path where the built `.ipa` will be copied. If it points to a non-existent directory path, it will be created. If the specified value is existing directory, the original file name will be used.
27
28
*`--team-id` - If used without parameter, lists all team names and ids. If used with team name or id, it will switch to automatic signing mode and configure the .xcodeproj file of your app. In this case .xcconfig should not contain any provisioning/team id flags. This team id will be further used for codesigning the app. For Xcode 9.0+, xcodebuild will be allowed to update and modify automatically managed provisioning profiles.
28
29
*`--provision` - If used without parameter, lists all eligible provisioning profiles. If used with UUID or name of your provisioning profile, it will switch to manual signing mode and configure the .xcodeproj file of your app. In this case xcconfig should not contain any provisioning/team id flags. This provisioning profile will be further used for codesigning the app.
29
30
*`--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
30
-
*`--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. For example: `--env.uglify --env.snapshot`.
31
+
*`--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. Supported additional flags:
*`--env.snapshot`- creates [Snapshot](https://docs.nativescript.org/performance-optimizations/bundling-with-webpack#v8-heap-snapshot) (only for release builds on Mac OS & for Android).
34
+
*`--env.uglify` - provides basic obfuscation and smaller app size.
35
+
*`--env.report` - creates a Webpack report inside a `report` folder in the root folder.
Copy file name to clipboardExpand all lines: docs/man_pages/project/testing/build.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,9 +22,22 @@ Usage | Synopsis
22
22
23
23
<% if(isHtml) { %>
24
24
25
-
### Command Limitations
25
+
### Options
26
+
27
+
*`--justlaunch` - If set, does not print the application output in the console.
28
+
*`--release` - If set, produces a release build. Otherwise, produces a debug build.
29
+
*`--device` - Specifies a connected device/emulator to start and run the app. `<Device ID>` is the index or `Device Identifier` of the target device as listed by the `$ tns device <Platform> --available-devices` command.
30
+
*`--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
31
+
*`--hmr` - (Beta) Enables the hot module replacement (HMR) feature. HMR depends on `webpack` and adding the `--hmr` flag to the command will automatically enable the `--bundle` option as well. <% if(isConsole) { %> The HMR feature is currently in Beta. For more information about the current development state and any known issues, please check the relevant GitHub issue: https://github.com/NativeScript/NativeScript/issues/6398.<% } %>
32
+
*`--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. Supported additional flags:
*`--env.snapshot`- creates [Snapshot](https://docs.nativescript.org/performance-optimizations/bundling-with-webpack#v8-heap-snapshot) (only for release builds on Mac OS & for Android).
35
+
*`--env.uglify` - provides basic obfuscation and smaller app size.
36
+
*`--env.report` - creates a Webpack report inside a `report` folder in the root folder.
Copy file name to clipboardExpand all lines: docs/man_pages/project/testing/run-android.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,13 @@ Start a default emulator if none are running, or run application on all connecte
33
33
*`--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.
34
34
*`--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
35
35
*`--hmr` - (Beta) Enables the hot module replacement (HMR) feature. HMR depends on `webpack` and adding the `--hmr` flag to the command will automatically enable the `--bundle` option as well. <% if(isConsole) { %> The HMR feature is currently in Beta. For more information about the current development state and any known issues, please check the relevant GitHub issue: https://github.com/NativeScript/NativeScript/issues/6398.<% } %>
36
-
*`--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. For example: `--env.uglify --env.snapshot`.
36
+
*`--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times.
*`--env.snapshot`- creates [Snapshot](https://docs.nativescript.org/performance-optimizations/bundling-with-webpack#v8-heap-snapshot) (only for release builds on Mac OS & for Android).
39
+
*`--env.uglify` - provides basic obfuscation and smaller app size.
40
+
*`--env.report` - creates a Webpack report inside a `report` folder in the root folder.
Copy file name to clipboardExpand all lines: docs/man_pages/project/testing/run-ios.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,13 @@ Start an emulator with specified device identifier and sdk | `$ tns run ios [--d
36
36
*`--release` - If set, produces a release build. Otherwise, produces a debug build.
37
37
*`--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
38
38
*`--hmr` - (Beta) Enables the hot module replacement (HMR) feature. HMR depends on `webpack` and adding the `--hmr` flag to the command will automatically enable the `--bundle` option as well. <% if(isConsole) { %> The HMR feature is currently in Beta. For more information about the current development state and any known issues, please check the relevant GitHub issue: https://github.com/NativeScript/NativeScript/issues/6398.<% } %>
39
-
*`--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. For example: `--env.uglify --env.snapshot`.
39
+
*`--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times.
*`--env.snapshot`- creates [Snapshot](https://docs.nativescript.org/performance-optimizations/bundling-with-webpack#v8-heap-snapshot) (only for release builds on Mac OS & for Android).
42
+
*`--env.uglify` - provides basic obfuscation and smaller app size.
43
+
*`--env.report` - creates a Webpack report inside a `report` folder in the root folder.
Copy file name to clipboardExpand all lines: docs/man_pages/project/testing/run.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,13 @@ Run on a selected connected device or running emulator. Will start emulator with
24
24
*`--device` - Specifies a connected device/emulator to start and run the app. `<Device ID>` is the index or `Device Identifier` of the target device as listed by the `$ tns device <Platform> --available-devices` command.
25
25
*`--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
26
26
*`--hmr` - (Beta) Enables the hot module replacement (HMR) feature. HMR depends on `webpack` and adding the `--hmr` flag to the command will automatically enable the `--bundle` option as well. <% if(isConsole) { %> The HMR feature is currently in Beta. For more information about the current development state and any known issues, please check the relevant GitHub issue: https://github.com/NativeScript/NativeScript/issues/6398.<% } %>
27
-
*`--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. For example: `--env.uglify --env.snapshot`.
27
+
*`--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. Supported additional flags:
*`--env.snapshot`- creates [Snapshot](https://docs.nativescript.org/performance-optimizations/bundling-with-webpack#v8-heap-snapshot) (only for release builds on Mac OS & for Android).
30
+
*`--env.uglify` - provides basic obfuscation and smaller app size.
31
+
*`--env.report` - creates a Webpack report inside a `report` folder in the root folder.
0 commit comments