|
3 | 3 |
|
4 | 4 | Usage | Synopsis
|
5 | 5 | ---|---
|
6 |
| -General | `$ tns create <App Name> [--path <Directory>] [--appid <App ID>] [--copy-from <Directory>]` |
| 6 | +General | `$ tns create <App Name> [--path <Directory>] [--appid <App ID>] [--copy-from <Directory>] [--template <Template>]` |
7 | 7 |
|
8 | 8 | Creates a new project for native development with NativeScript from the default template or from an existing NativeScript project.
|
9 | 9 |
|
10 | 10 | ### Options
|
11 | 11 | * `--path` - Specifies the directory where you want to create the project, if different from the current directory. The directory must be empty.
|
12 |
| -* `--appid` - Sets the application identifier for your project. |
| 12 | +* `--appid` - Sets the application identifier for your project. |
13 | 13 | * `--copy-from` - Specifies a directory which contains an existing NativeScript project. If not set, the NativeScript CLI creates the project from the default hello-world template.
|
| 14 | +* `--template` - Sets the source template for the project. The value can be anything that you can `npm install` - npm package, local path, .tgz, GitHub URL. The package will be used as `app` directory of the new application. |
| 15 | +<% if(isHtml) { %> |
| 16 | +If `--template typescript` or `--template tsc` is specified, the default TypeScript template (`tns-template-hello-world-ts`) will be used. |
| 17 | + |
| 18 | +In case the specified template is missing any of the `App_Resources` they will be completed in the `app` directory from the default template. |
| 19 | +<% } %> |
14 | 20 |
|
15 | 21 | ### Attributes
|
16 |
| -* `<App Name>` is the name of project. The specified name must meet the requirements of all platforms that you want to target. <% 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. |
17 |
| -For projects that target iOS, you can use uppercase or lowercase letters, numbers, and hyphens.<% } %> |
18 |
| -* `<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` |
| 22 | +* `<App Name>` is the name of project. The specified name must meet the requirements of all platforms that you want to target. <% 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. |
| 23 | +For projects that target iOS, you can use uppercase or lowercase letters, numbers, and hyphens.<% } %> |
| 24 | +* `<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` |
19 | 25 | 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`.<% } %>
|
20 | 26 |
|
21 |
| -<% if(isHtml) { %> |
| 27 | +<% if(isHtml) { %> |
22 | 28 | ### Related Commands
|
23 | 29 |
|
24 | 30 | Command | Description
|
25 | 31 | ----------|----------
|
26 | 32 | [init](init.html) | Initializes a project for development. The command prompts you to provide your project configuration interactively and uses the information to create a new package.json file or update the existing one.
|
27 | 33 | [install](/lib-management/install.html) | Installs all platforms and dependencies described in the `package.json` file in the current directory.
|
28 |
| -<% } %> |
| 34 | +<% } %> |
0 commit comments