Skip to content

docs: update outdated docs #4858

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 1 commit into from
Jul 16, 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
1 change: 0 additions & 1 deletion docs/man_pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Command | Description
---|---
[create](project/creation/create.html) | Creates a new project for native development with NativeScript.
[preview](project/testing/preview.html) | Generates a QR code that can be scanned by the NativeScript PlayGround app.
[init](project/creation/init.html) | Initializes an existing project for native development with NativeScript.
[platform add `<Platform>`](project/configuration/platform-add.html) | Configures the current project to target the selected platform.
[platform list](project/configuration/platform.html) | Lists all platforms that the project currently targets.
[platform remove `<Platform>`](project/configuration/platform-remove.html) | Removes the selected platform from the platforms that the project currently targets. This operation deletes all platform-specific files and subdirectories from your project.
Expand Down
2 changes: 1 addition & 1 deletion docs/man_pages/lib-management/plugin-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ position: 1
### Description

<% if(isConsole) { %>Installs the specified plugin and any packages that it depends on.<% } %>
<% if(isHtml) { %>Installs the specified plugin and its dependencies in the local `node_modules` folder, adds it to the `dependencies` section in `package.json`, and prepares the plugin for all installed platforms. If you have not configured any platforms for the project, the NativeScript CLI will prepare the plugin when you add a platform. For more information about working with plugins, see [NativeScript Plugins](https://github.com/NativeScript/nativescript-cli/blob/master/PLUGINS.md).<% } %>
<% if(isHtml) { %>Installs the specified plugin and its dependencies in the local `node_modules` folder, adds it to the `dependencies` section in `package.json`, and prepares the plugin for all installed platforms. If you have not configured any platforms for the project, the NativeScript CLI will prepare the plugin when you add a platform.<% } %>

### Commands

Expand Down
5 changes: 4 additions & 1 deletion docs/man_pages/lib-management/plugin-create.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ position: 1
Creates a new project for NativeScript plugin development. The project uses the [NativeScript Plugin Seed](https://github.com/NativeScript/nativescript-plugin-seed) as a base and contains the following directories:

* `src` - source code of the plugin
* `demo` - simple NativeScript application used to test and show plugin features
* `publish` - shell scripts used to build and pack the plugin source code and publish it in [NPM](https://www.npmjs.com/)

The command will also propose you to setup demo applications and if you accept them, it will create the following additional directories:
* `demo` - simple NativeScript application used to test and show plugin features
* `demo-angular` - simple Angular application used to test and show plugin features

The project is setup for easy commit in Github, which is why the command will ask you for your Github username.
<% if(isHtml) { %>Before starting to code your first plugin, you can visit the NativeScript documentation page for [building plugins](https://docs.nativescript.org/plugins/building-plugins#step-2-set-up-a-development-workflow) or the [plugin seed repository](https://github.com/NativeScript/nativescript-plugin-seed/blob/master/README.md).<% } %>

Expand Down
2 changes: 1 addition & 1 deletion docs/man_pages/lib-management/plugin-remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ position: 4
### Description

<% if(isConsole) { %>Uninstalls a plugin by its name.<% } %>
<% if(isHtml) { %>Removes the specified plugin and its dependencies from the local `node_modules` folder and the `dependencies` section in `package.json`. This operation does not remove the plugin from the installed platforms and you need to run `$ tns prepare` to finish uninstalling the plugin. For more information about working with plugins, see [NativeScript Plugins](https://github.com/NativeScript/nativescript-cli/blob/master/PLUGINS.md).<% } %>
<% if(isHtml) { %>Removes the specified plugin and its dependencies from the local `node_modules` folder and the `dependencies` section in `package.json`. This operation does not remove the plugin from the installed platforms and you need to run `$ tns prepare` to finish uninstalling the plugin.<% } %>

### Commands

Expand Down
2 changes: 1 addition & 1 deletion docs/man_pages/lib-management/plugin-update.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ position: 7
### Description

<% if(isConsole) { %>Uninstalls and installs the specified plugin(s) and any packages that it depends on.<% } %>
<% if(isHtml) { %>Uninstalls and installs the specified plugin(s) and its dependencies in the local `node_modules` folder, adds it to the `dependencies` section in `package.json`, and prepares the plugin(s) for all installed platforms. If you have not configured any platforms for the project, the NativeScript CLI will prepare the plugin(s) when you add a platform. For more information about working with plugins, see [NativeScript Plugins](https://github.com/NativeScript/nativescript-cli/blob/master/PLUGINS.md).<% } %>
<% if(isHtml) { %>Uninstalls and installs the specified plugin(s) and its dependencies in the local `node_modules` folder, adds it to the `dependencies` section in `package.json`, and prepares the plugin(s) for all installed platforms. If you have not configured any platforms for the project, the NativeScript CLI will prepare the plugin(s) when you add a platform.<% } %>

### Commands

Expand Down
12 changes: 5 additions & 7 deletions docs/man_pages/project/configuration/platform-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@ Configures the current project to target the selected platform. <% if(isHtml) {

Usage | Synopsis
------|-------
Android latest runtime | `$ tns platform add android [--framework-path <File Path>] [--symlink] [--sdk <API Level>] [--platform-template <Platform Template>]`
Android selected runtime | `$ tns platform add android[@<Version>] [--framework-path <File Path>] [--symlink] [--sdk <API Level>] [--platform-template <Platform Template>]`
<% if (isMacOS) { %>iOS latest runtime | `$ tns platform add ios [--framework-path <File Path>] [--symlink]`
iOS selected runtime | `$ tns platform add ios[@<Version>] [--framework-path <File Path>] [--symlink] [--platform-template <Platform Template>]`<% } %>
Android latest runtime | `$ tns platform add android [--framework-path <File Path>] [--sdk <API Level>] [--platform-template <Platform Template>]`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove --sdk

Android selected runtime | `$ tns platform add android[@<Version>] [--framework-path <File Path>] [--sdk <API Level>] [--platform-template <Platform Template>]`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove --sdk

<% if (isMacOS) { %>iOS latest runtime | `$ tns platform add ios [--framework-path <File Path>]`
iOS selected runtime | `$ tns platform add ios[@<Version>] [--framework-path <File Path>] [--platform-template <Platform Template>]`<% } %>

### Options

* `--framework-path` - Sets the path to a NativeScript runtime for the specified platform that you want to use instead of the default runtime. If `--symlink` is specified, `<File Path>` is the complete path to a valid npm package or a directory that contains a NativeScript runtime for the selected platform and must point to directory in which the runtime is already extracted. If `--symlink` is not specified, `<File Path>` must point to a valid npm package.
* `--symlink` - Creates a symlink to a NativeScript runtime for the specified platform that you want to use instead of the default runtime. If `--frameworkPath` is specified, creates a symlink to the specified directory. If `--frameworkPath` is not specified, creates a symlink to platform runtime installed with your current version of NativeScript.
* `--sdk` - Sets the target Android SDK for the project. `<API Level>` is a valid Android API level. For example: 17, 19, MNC.<% 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).<% } %>
* `--framework-path` - Sets the path to a NativeScript runtime for the specified platform that you want to use instead of the default runtime. `<File Path>` must point to a valid npm package.
* `--platform-template` - Sets the platform template that will be used for the native application. `<Platform Template>` is a valid npm package, path to directory, .tgz or GitHub URL that contains a native Android or iOS template.

### Arguments
Expand Down
3 changes: 1 addition & 2 deletions docs/man_pages/project/configuration/prepare.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ position: 7

### Description

Copies common and relevant platform-specific content from the `app` directory to the subdirectory for the selected target platform
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.<% } %>
Starts a Webpack compilation and prepares the app's `App_Resources` and the plugins `platforms` directories. The output is generated in a subdirectory for the selected target platform in the `platforms` directory. This lets you build the project for the selected platform. <% if(isMacOS) { %>You must specify the target platform for which you want to prepare your project.<% } %>

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.

Expand Down
1 change: 0 additions & 1 deletion docs/man_pages/project/creation/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,5 @@ Template | Command

Command | Description
----------|----------
[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.
[install](/lib-management/install.html) | Installs all platforms and dependencies described in the `package.json` file in the current directory.
<% } %>
2 changes: 1 addition & 1 deletion docs/man_pages/project/testing/build-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ General | `$ tns build android [--compileSdk <API Level>] [--key-store-path <Fil

### Options

* `--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).<% } %>
* `--compileSdk` - Sets the Android SDK that will be used to build the project. `<API Level>` is a valid Android API level. For example: 28, 29. The minimum supported SDK is 28. <% 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).<% } %>
* `--clean` - If set, forces the complete rebuild of the native application.
* `--release` - If set, produces a release build. Otherwise, produces a debug build. When set, you must also specify the `--key-store-*` options.
* `--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.
Expand Down