Skip to content

docs: add environment flags in CLI help #4519

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 4 commits into from
Apr 10, 2019
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
6 changes: 4 additions & 2 deletions docs/build-jekyll-md.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ rm -rf docs-cli
npm install --ignore-scripts

grunt docs-jekyll
cd docs-cli
mv index.md start.md
if [ -d docs-cli ]; then
cd docs-cli
mv index.md start.md
fi
8 changes: 7 additions & 1 deletion docs/man_pages/project/testing/build-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ General | `$ tns build android [--compileSdk <API Level>] [--key-store-path <Fil
* `--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.
* `--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.
* `--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
* `--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. For example: `--env.uglify --env.snapshot`.
* `--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. Supported additional flags:
* `--env.aot` - creates Ahead-Of-Time build (Angular only).
* `--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).
* `--env.uglify` - provides basic obfuscation and smaller app size.
* `--env.report` - creates a Webpack report inside a `report` folder in the root folder.
* `--env.sourceMap` - creates inline source maps (useful for debbuging bundled app).
* `--env.hiddenSourceMap` - creates sources maps in the root folder (useful for Crashlytics usage with bundled app in release).
* `--aab` - Specifies that the build will produce an Android App Bundle(`.aab`) file.

<% if(isHtml) { %>
Expand Down
8 changes: 7 additions & 1 deletion docs/man_pages/project/testing/build-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ General | `$ tns build ios [--for-device] [--release] [--copy-to <File Path>] [-
* `--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.
* `--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.
* `--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
* `--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. For example: `--env.uglify --env.snapshot`.
* `--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. Supported additional flags:
* `--env.aot` - creates Ahead-Of-Time build (Angular only).
* `--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).
* `--env.uglify` - provides basic obfuscation and smaller app size.
* `--env.report` - creates a Webpack report inside a `report` folder in the root folder.
* `--env.sourceMap` - creates inline source maps (useful for debbuging bundled app).
* `--env.hiddenSourceMap` - creates sources maps in the root folder (useful for Crashlytics usage with bundled app in release).

<% } %>

Expand Down
17 changes: 15 additions & 2 deletions docs/man_pages/project/testing/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,22 @@ Usage | Synopsis

<% if(isHtml) { %>

### Command Limitations
### Options

* `--justlaunch` - If set, does not print the application output in the console.
* `--release` - If set, produces a release build. Otherwise, produces a debug build.
* `--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.
* `--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
* `--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.<% } %>
* `--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. Supported additional flags:
* `--env.aot` - creates Ahead-Of-Time build (Angular only).
* `--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).
* `--env.uglify` - provides basic obfuscation and smaller app size.
* `--env.report` - creates a Webpack report inside a `report` folder in the root folder.
* `--env.sourceMap` - creates inline source maps (useful for debbuging bundled app).
* `--env.hiddenSourceMap` - creates sources maps in the root folder (useful for Crashlytics usage with bundled app in release).
* `--syncAllFiles` - Watches all production dependencies inside node_modules for changes. Triggers project rebuild if necessary!

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

### Related Commands

Expand Down
8 changes: 7 additions & 1 deletion docs/man_pages/project/testing/run-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ Start a default emulator if none are running, or run application on all connecte
* `--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.
* `--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
* `--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.<% } %>
* `--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. For example: `--env.uglify --env.snapshot`.
* `--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times.
* `--env.aot` - creates Ahead-Of-Time build (Angular only).
* `--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).
* `--env.uglify` - provides basic obfuscation and smaller app size.
* `--env.report` - creates a Webpack report inside a `report` folder in the root folder.
* `--env.sourceMap` - creates inline source maps (useful for debbuging bundled app).
* `--env.hiddenSourceMap` - creates sources maps in the root folder (useful for Crashlytics usage with bundled app in release).
* `--syncAllFiles` - Watches all production dependencies inside node_modules for changes. Triggers project rebuild if necessary!

<% if(isHtml) { %>
Expand Down
8 changes: 7 additions & 1 deletion docs/man_pages/project/testing/run-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ Start an emulator with specified device identifier and sdk | `$ tns run ios [--d
* `--release` - If set, produces a release build. Otherwise, produces a debug build.
* `--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
* `--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.<% } %>
* `--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. For example: `--env.uglify --env.snapshot`.
* `--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times.
* `--env.aot` - creates Ahead-Of-Time build (Angular only).
* `--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).
* `--env.uglify` - provides basic obfuscation and smaller app size.
* `--env.report` - creates a Webpack report inside a `report` folder in the root folder.
* `--env.sourceMap` - creates inline source maps (useful for debbuging bundled app).
* `--env.hiddenSourceMap` - creates sources maps in the root folder (useful for Crashlytics usage with bundled app in release).
* `--syncAllFiles` - Watches all production dependencies inside node_modules for changes. Triggers project rebuild if necessary!

<% } %>
Expand Down
8 changes: 7 additions & 1 deletion docs/man_pages/project/testing/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ Run on a selected connected device or running emulator. Will start emulator with
* `--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.
* `--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
* `--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.<% } %>
* `--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. For example: `--env.uglify --env.snapshot`.
* `--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. Supported additional flags:
* `--env.aot` - creates Ahead-Of-Time build (Angular only).
* `--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).
* `--env.uglify` - provides basic obfuscation and smaller app size.
* `--env.report` - creates a Webpack report inside a `report` folder in the root folder.
* `--env.sourceMap` - creates inline source maps (useful for debbuging bundled app).
* `--env.hiddenSourceMap` - creates sources maps in the root folder (useful for Crashlytics usage with bundled app in release).
* `--syncAllFiles` - Watches all production dependencies inside node_modules for changes. Triggers project rebuild if necessary!


Expand Down