Skip to content

Commit 92f6735

Browse files
committed
docs: updates to the help
1 parent b9bfc68 commit 92f6735

File tree

16 files changed

+247
-161
lines changed

16 files changed

+247
-161
lines changed

docs/man_pages/project/creation/create.md

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,53 +2,56 @@
22
title: tns create
33
position: 1
44
---<% } %>
5+
56
# tns create
67

8+
### Description
9+
10+
Interactively creates a new NativeScript app based on a predefined template.
711

8-
Usage | Synopsis
9-
---|---
10-
Create from default JavaScript template | `$ tns create [<App Name>] [--js] [--path <Directory>] [--appid <App ID>]`
11-
Create from default TypeScript template | `$ tns create [<App Name>] --ts [--path <Directory>] [--appid <App ID>]`
12-
Create from default Angular template | `$ tns create [<App Name>] --ng [--path <Directory>] [--appid <App ID>]`
13-
Create from default Vue.js template | `$ tns create [<App Name>] --vue [--path <Directory>] [--appid <App ID>]`
14-
Create from custom template | `$ tns create [<App Name>] [--path <Directory>] [--appid <App ID>] --template <Template>`
12+
### Commands
1513

16-
Interactively creates a new NativeScript app.
14+
Template | Synopsis
15+
---------|---------
16+
JavaScript based | `$ tns create [<App Name>] [--js] [--path <Directory>] [--appid <App ID>]`
17+
TypeScript based | `$ tns create [<App Name>] --ts [--path <Directory>] [--appid <App ID>]`
18+
Angular based | `$ tns create [<App Name>] --ng [--path <Directory>] [--appid <App ID>]`
19+
Vue.js based | `$ tns create [<App Name>] --vue [--path <Directory>] [--appid <App ID>]`
20+
Custom template | `$ tns create [<App Name>] [--path <Directory>] [--appid <App ID>] --template <Template>`
1721

1822
### Options
19-
* `--path` - Specifies the directory where you want to create the project, if different from the current directory. The directory must be empty.
20-
* `--appid` - Sets the application identifier for your project.
21-
* `--template` - Specifies a valid npm package which you want to use to create your project. If `--template` is not set, the NativeScript CLI will ask you to pick one from a predefined list afterwards.<% if(isHtml) { %> If one or more application assets are missing from the `App_Resources` directory in the package, the CLI adds them using the assets available in the default hello-world template.<% } %>
23+
24+
* `--path` - Specifies the directory where you want to create the project, if different from the current directory. `<Directory>` is the absolute path to an empty directory in which you want to create the project.
25+
* `--appid` - Sets the application identifier of your project. `<App ID>` is the value of the application identifier and it must meet the specific requirements of each platform that you want to target. If not specified, the application identifier is set to `org.nativescript.<App name>`.<% if(isConsole) { %> For more information about the `<App ID>` requirements, run `$ tns help create`.<% } %><% if(isHtml) { %> The application identifier must be a domain name in reverse. For projects that target Android, you can use uppercase or lowercase letters, numbers, and underscores in the strings of the reversed domain name, separated by a dot. Strings must be separated by a dot and must start with a letter. For example: `com.nativescript.My_Andro1d_App`. For projects that target iOS, you can use uppercase or lowercase letters, numbers, and hyphens in the strings of the reversed domain name. Strings must be separated by a dot. For example: `com.nativescript.My-i0s-App`.
26+
* `--template` - Specifies a valid npm package which you want to use as a base to create your project. If `--template` is not set, the NativeScript CLI will ask you to pick one from a predefined list afterwards.<% if(isHtml) { %> If one or more application assets are missing from the `App_Resources` directory in the package, the CLI adds them using the assets available in the default hello-world template.<% } %> `<Template>` can be the name of a package in the npm registry, a local path or a GitHub URL to a directory, or a `.tar.gz` archive containing a `package.json` file. The contents of the package will be copied to the `app` directory of your project.<% } %>
2227
* `--js`, `--javascript` - Sets the template for your project to the JavaScript template.
2328
* `--ts`, `--tsc`, `--typescript` - Sets the template for your project to the TypeScript template.
2429
* `--ng`, `--angular` - Sets the template for your project to the Angular template.
2530
* `--vue`, `--vuejs` - Sets the template for your project to the Vue.js template.
2631

27-
### Attributes
28-
* `<App Name>` is the name of project. The specified name must meet the requirements of all platforms that you want to target. If not specified, the NativeScript CLI will ask you for it afterwards. <% if(isConsole) { %>For more information about the `<App Name>` requirements, run `$ tns help create`<% } %><% if(isHtml) { %>For projects that target Android, you can use uppercase or lowercase letters, numbers, and underscores. The name must start with a letter.
29-
For projects that target iOS, you can use uppercase or lowercase letters, numbers, and hyphens.<% } %>
30-
* `<App ID>` is the application identifier for your project. It must be a domain name in reverse and must meet the requirements of all platforms that you want to target. If not specified, the application identifier is set to `org.nativescript.<App name>` <% if(isConsole) { %>For more information about the `<App ID>` requirements, run `$ tns help create`<% } %><% if(isHtml) { %>For projects that target Android, you can use uppercase or lowercase letters, numbers, and underscores in the strings of the reversed domain name, separated by a dot. Strings must be separated by a dot and must start with a letter. For example: `com.nativescript.My_Andro1d_App`
31-
For projects that target iOS, you can use uppercase or lowercase letters, numbers, and hyphens in the strings of the reversed domain name. Strings must be separated by a dot. For example: `com.nativescript.My-i0s-App`.
32-
* `<Template>` is a valid npm package which you want to use as template for your app. You can specify the package by name in the npm registry or by local path or GitHub URL to a directory or .tar.gz containing a package.json file. The contents of the package will be copied to the `app` directory of your project.<% } %>
33-
34-
<% if(isHtml) { %>
32+
### Arguments
3533

36-
### Templates Usage
34+
`<App Name>` is the name of project and must meet the requirements of each platform that you want to target. If not specified in the initial command, the NativeScript CLI will ask you for it afterwards.<% if(isConsole) { %> For more information about the `<App Name>` requirements, run `$ tns help create`.<% } %><% if(isHtml) { %> For projects that target Android, you can use uppercase or lowercase letters, numbers, and underscores. The name must start with a letter. For projects that target iOS, you can use uppercase or lowercase letters, numbers, and hyphens.
35+
<% } %>
3736

38-
Based on the selected options, the NativeScript CLI will use the project templates below:
37+
<% if(isHtml) { %>
3938

40-
Selected Option | Template
41-
----------|----------
42-
`Plain JavaScript - Hello World`, `--js`, `--javascript` | tns-template-hello-world
43-
`Plain JavaScript - SideDrawer` | tns-template-drawer-navigation
44-
`Plain JavaScript - Tabs` | tns-template-tab-navigation
45-
`Plain TypeScript - Hello World`, `--ts`, `--tsc`, `--typescript` | tns-template-hello-world-ts
46-
`Plain TypeScript - SideDrawer` | tns-template-drawer-navigation-ts
47-
`Plain TypeScript - Tabs` | tns-template-tab-navigation-ts
48-
`Angular - Hello World`, `--ng`, `--angular` | tns-template-hello-world-ng
49-
`Angular - SideDrawer` | tns-template-drawer-navigation-ng
50-
`Angular - Tabs` | tns-template-tab-navigation-ng
51-
`Vue.js`, `--vue`, `--vuejs` | tns-template-blank-vue
39+
### Application Templates
40+
41+
Below you can see a list of the recommended NativeScript starting templates and the commands you should use to generate them.
42+
43+
Template | Command
44+
---------|----------
45+
`JavaScript - Hello World`, `--js`, `--javascript` | tns create --template tns-template-hello-world
46+
`JavaScript - SideDrawer` | tns create tns-template-drawer-navigation
47+
`JavaScript - Tabs` | tns create tns-template-tab-navigation
48+
`TypeScript - Hello World`, `--ts`, `--tsc`, `--typescript` | tns create tns-template-hello-world-ts
49+
`TypeScript - SideDrawer` | tns create tns-template-drawer-navigation-ts
50+
`TypeScript - Tabs` | tns create tns-template-tab-navigation-ts
51+
`Angular - Hello World`, `--ng`, `--angular` | tns create tns-template-hello-world-ng
52+
`Angular - SideDrawer` | tns create tns-template-drawer-navigation-ng
53+
`Angular - Tabs` | tns create tns-template-tab-navigation-ng
54+
`Vue.js`, `--vue`, `--vuejs` | tns create tns-template-blank-vue
5255

5356
### Related Commands
5457

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

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,34 @@
22
title: tns build android
33
position: 1
44
---<% } %>
5+
56
# tns build android
67

8+
### Description
9+
10+
Builds the project for Android and produces an APK that you can manually deploy on an Android device or Android emulator.
11+
12+
### Commands
713

814
Usage | Synopsis
915
---|---
1016
General | `$ tns build android [--compileSdk <API Level>] [--key-store-path <File Path> --key-store-password <Password> --key-store-alias <Name> --key-store-alias-password <Password>] [--release] [--static-bindings] [--copy-to <File Path>] [--bundle [<value>] [--env.*]]`
1117

12-
Builds the project for Android and produces an APK that you can manually deploy on device or in the native emulator.
13-
1418
### Options
15-
* `--compileSdk` - Sets the Android SDK that will be used to build the project.
16-
* `--clean` - If set, forces rebuilding the native application.
19+
20+
* `--compileSdk` - Sets the Android SDK that will be used to build the project. `<API Level>` is a valid Android API level. For example: 22, 23.<% if(isHtml) { %> For a complete list of the Android API levels and their corresponding Android versions, click [here](http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#platform).<% } %>
21+
* `--clean` - If set, forces the complete rebuild of the native application.
1722
* `--release` - If set, produces a release build. Otherwise, produces a debug build. When set, you must also specify the `--key-store-*` options.
1823
* `--key-store-path` - Specifies the file path to the keystore file (P12) which you want to use to code sign your APK. You can use the `--key-store-*` options along with `--release` to produce a signed release build. You need to specify all `--key-store-*` options.
1924
* `--key-store-password` - Provides the password 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.
2025
* `--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.
2126
* `--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.
2227
* `--copy-to` - Specifies the file path where the built `.apk` will be copied. If it points to a non-existent directory, it will be created. If the specified value is directory, the original file name will be used.
23-
* `--bundle` - Specifies that a bundler (e.g. webpack) should be used if one is present. If no value is passed will default to `webpack`.
28+
* `--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
2429
* `--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. For example: `--env.uglify --env.snapshot`.
2530

26-
### Attributes
27-
`<API Level>` is a valid Android API level. For example: 22, 23.<% if(isHtml) { %> For a complete list of the Android API levels and their corresponding Android versions, click [here](http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#platform).<% } %>
28-
2931
<% if(isHtml) { %>
32+
3033
### Command Limitations
3134

3235
* When the `--release` flag is set, you must also specify all `--key-store-*` options.

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

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,40 @@
22
title: tns build ios
33
position: 2
44
---<% } %>
5+
56
# tns build ios
67

8+
### Description
9+
10+
Builds the project for iOS and produces an `APP` or `IPA` that you can manually deploy in the iOS Simulator or on a device.
11+
12+
<% if(isConsole && (isWindows || isLinux)) { %>WARNING: You can run this command only on macOS systems. To view the complete help for this command, run `$ tns help build ios`<% } %>
13+
<% if((isConsole && isMacOS) || isHtml) { %>
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+
16+
### Commands
717

818
Usage | Synopsis
919
---|---
1020
General | `$ tns build ios [--for-device] [--release] [--copy-to <File Path>] [--provision [<UUID/name>]] [--bundle [<value>] [--env.*]]`
1121

12-
Builds the project for iOS and produces an `APP` or `IPA` that you can manually deploy in the iOS Simulator or on device, respectively.
13-
14-
<% 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 build ios`<% } %>
15-
<% if((isConsole && isMacOS) || isHtml) { %>
16-
<% 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).<% } %>
17-
1822
### Options
23+
1924
* `--release` - If set, produces a release build. Otherwise, produces a debug build.
2025
* `--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.
2126
* `--copy-to` - Specifies the file path where the built `.ipa` will be copied. If it points to a non-existent directory, it will be created. If the specified value is directory, the original file name will be used.
2227
* `--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.
2328
* `--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.
24-
* `--bundle` - Specifies that a bundler (e.g. webpack) should be used if one is present. If no value is passed will default to `webpack`.
29+
* `--bundle` - Specifies that the `webpack` bundler will be used to bundle the application.
2530
* `--env.*` - Specifies additional flags that the bundler may process. May be passed multiple times. For example: `--env.uglify --env.snapshot`.
31+
2632
<% } %>
33+
2734
<% if(isHtml) { %>
35+
2836
### Command Limitations
2937

30-
* You can run `$ tns build ios` only on OS X systems.
38+
* You can run the `$ tns build ios` command only on macOS systems.
3139

3240
### Related Commands
3341

docs/man_pages/project/testing/build.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,29 @@
22
title: tns build
33
position: 3
44
---<% } %>
5+
56
# tns build
67

8+
### Description
9+
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+
12+
### Commands
713

814
Usage | Synopsis
915
---|---
1016
<% if((isConsole && isMacOS) || isHtml) { %>General | `$ tns build <Platform>`<% } %><% if(isConsole && (isLinux || isWindows)) { %>General | `$ tns build android`<% } %>
1117

12-
Builds the project for Android <% if(isMacOS) { %>or iOS <% } %>and produces an application package that you can manually deploy on device or in the native emulator. <% if(isMacOS) { %>You must specify the target platform for which you want to build your project.<% } %>
13-
14-
<% if((isConsole && isMacOS) || isHtml) { %>### Attributes
18+
<% if((isConsole && isMacOS) || isHtml) { %>### Arguments
1519
`<Platform>` is the target mobile platform for which you want to build your project. You can set the following target platforms.
16-
* `android` - Builds the project for Android and produces an `APK` that you can manually deploy on device or in the native emulator.
17-
* `ios` - Builds the project for iOS and produces an `APP` or `IPA` that you can manually deploy in the iOS Simulator or on device, respectively.<% } %>
20+
* `android` - Build the project for Android and produces an `APK` that you can manually deploy on a device or in the native emulator.
21+
* `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.<% } %>
1822

1923
<% if(isHtml) { %>
24+
2025
### Command Limitations
2126

22-
* You can run `$ tns build ios` only on OS X systems.
27+
* You can run the `$ tns build ios` command only on macOS systems.
2328

2429
### Related Commands
2530

0 commit comments

Comments
 (0)