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
Copy file name to clipboardExpand all lines: docs/man_pages/project/configuration/prepare.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,12 @@ position: 7
10
10
Copies common and relevant platform-specific content from the `app` directory to the subdirectory for the selected target platform
11
11
in the `platforms` directory. This lets you build the project with the SDK for the selected platform. <% if(isMacOS) { %>You must specify the target platform for which you want to prepare your project.<% } %>
12
12
13
+
When running this command the HMR (Hot Module Replacement) is not enabled by default. In case you want to enable HMR, you can pass `--hmr` flag.
14
+
15
+
<% if(isHtml) { %>
16
+
> NOTE: When passing `--release` CLI will disable HMR.
17
+
<% } %>
18
+
13
19
### Commands
14
20
15
21
Usage | Synopsis
@@ -21,6 +27,10 @@ Usage | Synopsis
21
27
*`android` - Prepares your project for an Android build.
22
28
*`ios` - Prepares your project for an iOS build.<% } %>
23
29
30
+
### Options
31
+
32
+
*`--hmr` - Enables the hot module replacement (HMR) feature.
*`--key-store-alias` - Provides the alias for the keystore file specified with `--key-store-path`. You can use the `--key-store-*` options along with `--release` to produce a signed release build. You need to specify all `--key-store-*` options.
26
26
*`--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
-
*`--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
29
28
*`--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).
*`--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.
28
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.
29
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.
30
-
*`--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
31
30
*`--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).
Copy file name to clipboardExpand all lines: docs/man_pages/project/testing/build.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,12 @@ position: 3
9
9
10
10
Builds the project for Android <% if(isMacOS) { %>or iOS <% } %>and produces an application package that you can manually deploy on a device or native emulator. <% if(isMacOS) { %>You must specify the target platform for which you want to build your project.<% } %>
11
11
12
+
When running this command the HMR (Hot Module Replacement) is not enabled by default. In case you want to enable HMR, you can pass `--hmr` flag.
13
+
14
+
<% if(isHtml) { %>
15
+
> NOTE: When passing `--release` CLI will disable HMR.
16
+
<% } %>
17
+
12
18
### Commands
13
19
14
20
Usage | Synopsis
@@ -20,24 +26,21 @@ Usage | Synopsis
20
26
*`android` - Build the project for Android and produces an `APK` that you can manually deploy on a device or in the native emulator.
21
27
*`ios` - Build the project for iOS and produces an `APP` or `IPA` that you can manually deploy in the iOS Simulator or on a device.<% } %>
22
28
23
-
<% if(isHtml) { %>
24
-
25
29
### Options
26
30
27
31
*`--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.
32
+
*`--release` -If set, produces a release build by running webpack in production mode and native build in release mode. Otherwise, produces a debug build.
29
33
*`--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.<% } %>
34
+
*`--hmr` - Enables the hot module replacement (HMR) feature.
32
35
*`--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
38
*`--env.uglify` - provides basic obfuscation and smaller app size.
36
39
*`--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/debug-android.md
+1-7Lines changed: 1 addition & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,6 @@ position: 4
9
9
10
10
Initiates a debugging session for your project on a connected Android device or Android emulator. When necessary, the command will prepare, build, deploy and launch the app before starting the debug session. While debugging, the output from the application is printed in the console and any changes made to your code are synchronizes with the deployed app.
11
11
12
-
To enable Hot Module Replacement (HMR) in Angular projects, follow the steps outlined in [the HMR documentation section](https://docs.nativescript.org/performance-optimizations/bundling-with-webpack#hot-module-replacement).
13
-
14
12
### Commands
15
13
16
14
Usage | Synopsis
@@ -30,14 +28,10 @@ Attach the debug tools to a running app in the native emulator | `$ tns debug an
30
28
*`--timeout` - Sets the number of seconds that the NativeScript CLI will wait for the emulator/device to boot. If not set, the default timeout is 90 seconds.
31
29
*`--no-watch` - If set, changes in your code will not be reflected during the execution of this command.
32
30
*`--clean` - If set, forces the complete rebuild of the native application.
33
-
*`--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
34
-
*`--hmr` - 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) { %> 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.<% } %>
35
-
*`--syncAllFiles` - Watches all production dependencies inside node_modules for changes. Triggers project rebuild if necessary!
31
+
*`--no-hmr` - Disables Hot Module Replacement (HMR). In this case, when a change in the code is applied, CLI will transfer the modified files and restart the application.
36
32
37
33
<% if(isHtml) { %>
38
34
39
-
>Note: For more information about HMR, the current development state and any known issues, please check the relevant GitHub issue: https://github.com/NativeScript/NativeScript/issues/6398.
40
-
41
35
### Command Limitations
42
36
43
37
* You must have Google Chrome installed on your machine.
Copy file name to clipboardExpand all lines: docs/man_pages/project/testing/debug-ios.md
+1-7Lines changed: 1 addition & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,6 @@ Initiates a debugging session for your project on a connected iOS device or in t
13
13
<% if((isConsole && isMacOS) || isHtml) { %>
14
14
<% if(isHtml) { %>> <% } %>IMPORTANT: Before building for iOS device, verify that you have configured a valid pair of certificate and provisioning profile on your macOS system. <% if(isHtml) { %>For more information, see the [Code Signing](https://developer.apple.com/support/code-signing/) and [Maintain Signing Assets](https://help.apple.com/xcode/mac/current/#/dev3a05256b8) sections from the Apple Developer documentation.<% } %>
15
15
16
-
To enable Hot Module Replacement (HMR) in Angular projects, follow the steps outlined in this wiki: https://github.com/NativeScript/nativescript-angular/wiki/HMR.
17
-
18
16
### Commands
19
17
20
18
Usage | Synopsis
@@ -35,17 +33,13 @@ Attach the debug tools to a running app in the iOS simulator | `$ tns debug ios
35
33
*`--timeout` - Sets the number of seconds that NativeScript CLI will wait to find the inspector socket port from device's logs. If not set, the default timeout is 10 seconds.
36
34
*`--no-watch` - If set, changes in your code will not be reflected during the execution of this command.
37
35
*`--clean` - If set, forces the complete rebuild of the native application.
38
-
*`--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
39
-
*`--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
+
*`--no-hmr` - Disables Hot Module Replacement (HMR). In this case, when a change in the code is applied, CLI will transfer the modified files and restart the application.
40
37
*`--chrome` - Deprecated - default behavior uses '--chrome' implicitly. Allows debugging in Chrome Developer Tools. If set, Safari Web Inspector is not started and debugging is attached to Chrome Developer Tools.
41
38
*`--inspector` - If set, the developer tools in the Safari Web Inspector are used for debugging the application.
42
-
*`--syncAllFiles` - Watches all production dependencies inside node_modules for changes. Triggers project rebuild if necessary!
43
39
44
40
<% } %>
45
41
<% if(isHtml) { %>
46
42
47
-
>Note: Hot Module Replacement (HMR) 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.
48
-
49
43
### Command Limitations
50
44
51
45
* You can run `$ tns debug ios` only on macOS systems.
Copy file name to clipboardExpand all lines: docs/man_pages/project/testing/debug.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,28 @@ position: 6
9
9
10
10
Initiates a debugging session for your project on a connected device or native emulator. <% if(isMacOS) { %>You must specify the target platform on which you want to debug.<% } %> When necessary, the command will prepare, build, deploy and launch the app before starting the debug session. While debugging, the output from the application is printed in the console and any changes made to your code are synchronized on all connected devices or running emulators.
11
11
12
+
<% if(isHtml) { %>
13
+
#### How file changes are handled
14
+
With HMR (Hot Module Replacement):
15
+
* Changes in `.js`, `.ts`, `.less`, `.sass` and other file types that are accepted will cause a refresh of the application.
16
+
* Changes in `App_Resources` will cause a rebuild of the application.
17
+
* Changes in any `package.json` file inside the project will cause a rebuild of the application.
18
+
* Changes in `node_modules/somePlugin` if accepted will cause a refresh of the application.
19
+
* Changes in `node_modules/somePlugin/platforms` will cause a rebuild of the application.
20
+
* Changes in `node_modules/somePlugin/package.json` file will cause a rebuild of the application.
21
+
* Changes that are not accepted and HMR fails will cause a restart of the native application.
22
+
23
+
With **no** HMR:
24
+
* Changes in `.js`, `.ts`, `.less`, `.sass` and other file types will cause a restart of the native application.
25
+
* Changes in `App_Resources` will cause a rebuild of the application.
26
+
* Changes in any `package.json` file inside the project will cause a rebuild of the application.
27
+
* Changes in `node_modules/somePlugin` will cause a restart of the native application.
28
+
* Changes in `node_modules/somePlugin/platforms` will cause a rebuild of the application.
29
+
* Changes in `node_modules/somePlugin/package.json` file will cause a rebuild of the application.
30
+
31
+
When running this command with `--debug-brk` any file change will cause a restart of the native application (HMR is disabled). Changes in `App_Resources` and `node_modules/somePlugin/platforms` will cause a rebuild of the application.
Copy file name to clipboardExpand all lines: docs/man_pages/project/testing/preview.md
+1-8Lines changed: 1 addition & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,8 +15,6 @@ To scan the QR code and deploy your app on a device, you need to have the Native
15
15
16
16
After scanning the QR code with the scanner provided in the NativeScript Playground app, your app will be launched on your device through the Preview app. Additionally, any changes made to your project will be automatically synchronized with the deployed app.
17
17
18
-
To enable Hot Module Replacement (HMR) in Angular projects, follow the steps outlined in this wiki: https://github.com/NativeScript/nativescript-angular/wiki/HMR.
19
-
20
18
### Commands
21
19
22
20
Usage | Synopsis
@@ -25,15 +23,10 @@ Generates a QR code that can be scanned by the NativeScript PlayGround app | `tn
25
23
26
24
### Options
27
25
28
-
*`--bundle` - (Beta) Specifies that the `webpack` bundler will be used to bundle the application.<% if(isConsole) { %> The support for webpack in preview is currently in Beta. Please, do not hesitate to report any problems that you experience with the feature by opening a new issue in the NativeScript CLI repository: https://github.com/NativeScript/nativescript-cli/issues/new/choose.<% } %>
29
-
*`--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.<% } %>
26
+
*`--no-hmr` - Disables Hot Module Replacement (HMR). In this case, when a change in the code is applied, CLI will transfer the modified files and restart the application.
30
27
31
28
<% if(isHtml) { %>
32
29
33
-
>Note: Hot Module Replacement (HMR) 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.
34
-
35
-
>Note: Webpack support for the `tns preview` command is currently in Beta. Please, do not hesitate to report any problems that you experience with the feature by opening a new issue in the NativeScript CLI repository: https://github.com/NativeScript/nativescript-cli/issues/new/choose.
36
-
37
30
### Command Limitations
38
31
39
32
* The Preview app comes with a predefined set of NativeScript plugins. If your app utilizes a plugin that is not present in the Preview app, you will see a warning message and your app might not work as expected.
0 commit comments