Skip to content

Commit b9b9cea

Browse files
committed
Suggested changes to the help for tns install
1 parent ddee152 commit b9b9cea

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

docs/man_pages/project/configuration/install.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ install
33

44
Usage | Synopsis
55
---|---
6-
General | `$ tns install [module] [--path]`
6+
Install all dependencies | `$ tns install [--path]`
7+
Install a selected npm module | `$ tns install <Module>`
8+
Enable TypeScript support | `tns install typescript`
79

8-
When executed without a `module` argument - install all platforms and dependencies described in the `package.json` file in the current directory.
9-
10-
When a `module` argument is given - install the specified npm module. If `module` is a path to an existing directory, then the npm module from that path is installed. If `module` does not refer to an existing directory, then the module with the name `nativescript-dev-<module>` is installed from the npm registry. This command is intended for installing NativeScript-related development modules. For example, by executing `tns install typescript`, TypeScript support is installed into the project. Look for modules in the npm registry whose name starts with `nativescript-dev` to discover other development modules for NativeScript.
10+
Installs all dependencies described in a valid `package.json` or installs a selected NativeScript development module as a dev dependency.
1111

1212
<% if(isHtml) { %>
1313
The `package.json` file must be a valid `package.json` describing the configuration of a NativeScript project. If missing or corrupted, you can recreate the file by running `$ tns init` in the directory of a NativeScript project.
@@ -16,7 +16,11 @@ The `package.json` file must be a valid `package.json` describing the configurat
1616
### Options
1717
* `--path` - Specifies the directory which contains the `package.json` file, if different from the current directory.
1818

19-
<% if(isHtml) { %>
19+
### Arguments
20+
* `<Module>` - Specifies a NativeScript development module by path to a local directory containing a valid npm module or by name in the npm registry.<% if(isHtml) { %> When a `<Module>` is specified, this command adds the module as a dev dependency in your `package.json`.
21+
22+
> **TIP:** When installing a module from the npm registry, you can specify it by full name or suffix. NativeScript development modules are published in the npm registry with the following name format: `nativescript-dev-<suffix>`.
23+
2024
### Related Commands
2125

2226
Command | Description
@@ -26,4 +30,4 @@ Command | Description
2630
[platform update](platform-update.html) | Updates the NativeScript runtime for the specified platform.
2731
[platform](platform.html) | Lists all platforms that the project currently targets.
2832
[prepare](prepare.html) | Copies common and relevant platform-specific content from the app directory to the subdirectory for the selected target platform in the platforms directory.
29-
<% } %>
33+
<% } %>

0 commit comments

Comments
 (0)