Skip to content

Commit 04ef643

Browse files
author
Dimitar Tachev
authored
Merge pull request #4519 from NativeScript/niliev/env
docs: add environment flags in CLI help
2 parents 34f4e45 + 8b618cf commit 04ef643

File tree

7 files changed

+54
-9
lines changed

7 files changed

+54
-9
lines changed

docs/build-jekyll-md.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ rm -rf docs-cli
55
npm install --ignore-scripts
66

77
grunt docs-jekyll
8-
cd docs-cli
9-
mv index.md start.md
8+
if [ -d docs-cli ]; then
9+
cd docs-cli
10+
mv index.md start.md
11+
fi

docs/man_pages/project/testing/build-android.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ General | `$ tns build android [--compileSdk <API Level>] [--key-store-path <Fil
2626
* `--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.
2727
* `--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.
2828
* `--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:
30+
* `--env.aot` - creates Ahead-Of-Time build (Angular only).
31+
* `--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.
34+
* `--env.sourceMap` - creates inline source maps (useful for debbuging bundled app).
35+
* `--env.hiddenSourceMap` - creates sources maps in the root folder (useful for Crashlytics usage with bundled app in release).
3036
* `--aab` - Specifies that the build will produce an Android App Bundle(`.aab`) file.
3137

3238
<% if(isHtml) { %>

docs/man_pages/project/testing/build-ios.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@ General | `$ tns build ios [--for-device] [--release] [--copy-to <File Path>] [-
2727
* `--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.
2828
* `--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.
2929
* `--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`.
30+
* `--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. Supported additional flags:
31+
* `--env.aot` - creates Ahead-Of-Time build (Angular only).
32+
* `--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).
33+
* `--env.uglify` - provides basic obfuscation and smaller app size.
34+
* `--env.report` - creates a Webpack report inside a `report` folder in the root folder.
35+
* `--env.sourceMap` - creates inline source maps (useful for debbuging bundled app).
36+
* `--env.hiddenSourceMap` - creates sources maps in the root folder (useful for Crashlytics usage with bundled app in release).
3137

3238
<% } %>
3339

docs/man_pages/project/testing/build.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,22 @@ Usage | Synopsis
2222

2323
<% if(isHtml) { %>
2424

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:
33+
* `--env.aot` - creates Ahead-Of-Time build (Angular only).
34+
* `--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.
37+
* `--env.sourceMap` - creates inline source maps (useful for debbuging bundled app).
38+
* `--env.hiddenSourceMap` - creates sources maps in the root folder (useful for Crashlytics usage with bundled app in release).
39+
* `--syncAllFiles` - Watches all production dependencies inside node_modules for changes. Triggers project rebuild if necessary!
2640

27-
* You can run the `$ tns build ios` command only on macOS systems.
2841

2942
### Related Commands
3043

docs/man_pages/project/testing/run-android.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ Start a default emulator if none are running, or run application on all connecte
3333
* `--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.
3434
* `--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
3535
* `--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.
37+
* `--env.aot` - creates Ahead-Of-Time build (Angular only).
38+
* `--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.
41+
* `--env.sourceMap` - creates inline source maps (useful for debbuging bundled app).
42+
* `--env.hiddenSourceMap` - creates sources maps in the root folder (useful for Crashlytics usage with bundled app in release).
3743
* `--syncAllFiles` - Watches all production dependencies inside node_modules for changes. Triggers project rebuild if necessary!
3844

3945
<% if(isHtml) { %>

docs/man_pages/project/testing/run-ios.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,13 @@ Start an emulator with specified device identifier and sdk | `$ tns run ios [--d
3636
* `--release` - If set, produces a release build. Otherwise, produces a debug build.
3737
* `--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
3838
* `--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.
40+
* `--env.aot` - creates Ahead-Of-Time build (Angular only).
41+
* `--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.
44+
* `--env.sourceMap` - creates inline source maps (useful for debbuging bundled app).
45+
* `--env.hiddenSourceMap` - creates sources maps in the root folder (useful for Crashlytics usage with bundled app in release).
4046
* `--syncAllFiles` - Watches all production dependencies inside node_modules for changes. Triggers project rebuild if necessary!
4147

4248
<% } %>

docs/man_pages/project/testing/run.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ Run on a selected connected device or running emulator. Will start emulator with
2424
* `--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.
2525
* `--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
2626
* `--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:
28+
* `--env.aot` - creates Ahead-Of-Time build (Angular only).
29+
* `--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.
32+
* `--env.sourceMap` - creates inline source maps (useful for debbuging bundled app).
33+
* `--env.hiddenSourceMap` - creates sources maps in the root folder (useful for Crashlytics usage with bundled app in release).
2834
* `--syncAllFiles` - Watches all production dependencies inside node_modules for changes. Triggers project rebuild if necessary!
2935

3036

0 commit comments

Comments
 (0)