Skip to content

Commit b08a565

Browse files
committed
Help for plugin commands
1 parent 646d557 commit b08a565

File tree

4 files changed

+83
-0
lines changed

4 files changed

+83
-0
lines changed

docs/man_pages/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Command | Description
2828
[emulate `<Platform>`](project/testing/emulate.html) | Deploys the project in the native emulator for the selected target platform.
2929
[run `<Platform>`](project/testing/run.html) | Runs your project on a connected device or in the native emulator, if configured.
3030
[debug `<Platform>`](project/testing/debug.html) | Debugs your project on a connected device.
31+
[plugin](plugin.html) | Lists all installed plugins for your project or lets you manage the plugins for your project.
3132

3233
## Device Commands
3334
Command | Description
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
plugin add
2+
==========
3+
4+
Usage | Synopsis
5+
------|-------
6+
General | `$ tns plugin add <Plugin>`
7+
8+
<% if(isConsole) { %>Installs the specified plugin and any packages that it depends on.<% } %>
9+
<% 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. For more information about working with plugins, see [NativeScript Plugins](https://github.com/NativeScript/nativescript-cli/PLUGINS.md).<% } %>
10+
11+
### Attributes
12+
13+
* `<Plugin>` is a valid NativeScript plugin, specified by any of the following.
14+
* A `<Name>` or `<Name>@<Version>` where `<Name>` is the name of a plugin that is published in the npm registry and `<Version>` is a valid version of this plugin.
15+
* A `<Local Path>` to the directory which contains the plugin, including its `package.json` file.
16+
* A `<Local Path>` to a `.tar.gz` archive containing a directory with the plugin and its `package.json` file.
17+
* A `<URL>` which resolves to a `.tar.gz` archive containing a directory with the plugin and its `package.json` file.
18+
* A `<git Remote URL>` which resolves to a `.tar.gz` archive containing a directory with the plugin and its `package.json` file.
19+
20+
<% if(isHtml) { %>
21+
### Prerequisites
22+
23+
* Verify that the plugin that you want to add contains a valid `package.json` file. Valid `package.json` files contain a `nativescript` section.
24+
25+
### Related Commands
26+
27+
Command | Description
28+
----------|----------
29+
[library](library.html) | You must run the library command with a related command.
30+
[library add](library-add.html) | Adds a native library to the current project.
31+
[plugin](plugin.html) | Lists all installed plugins for your project or lets you manage the plugins for your project.
32+
[plugin remove](plugin-remove.html) | Uninstalls the specified plugin and its dependencies.
33+
<% } %>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
plugin remove
2+
==========
3+
4+
Usage | Synopsis
5+
------|-------
6+
General | `$ tns plugin remove <Plugin>`
7+
8+
<% if(isConsole) { %>Uninstalls a plugin by its name.<% } %>
9+
<% 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/PLUGINS.md).<% } %>
10+
11+
### Attributes
12+
13+
* `<Plugin>` is the name of the plugin as listed in its `package.json` file.
14+
15+
<% if(isHtml) { %>
16+
### Related Commands
17+
18+
Command | Description
19+
----------|----------
20+
[library](library.html) | You must run the library command with a related command.
21+
[library add](library-add.html) | Adds a native library to the current project.
22+
[plugin](plugin.html) | Lists all installed plugins for your project or lets you manage the plugins for your project.
23+
[plugin add](plugin-add.html) | Installs the specified plugin and its dependencies.
24+
<% } %>
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
plugin
2+
==========
3+
4+
Usage | Synopsis
5+
---|---
6+
List plugins | `$ tns plugin`
7+
Manage plugins | `$ tns plugin <Command>`
8+
9+
Lists all installed plugins for your project or lets you manage the plugins for your project.
10+
11+
### Attributes
12+
`<Command>` extends the `plugin` command. You can set the following values for this attribute.
13+
* `add` - Installs the specified plugin and its dependencies.
14+
* `remove` - Uninstalls the specified plugin and its dependencies.
15+
16+
<% if(isHtml) { %>
17+
### Related Commands
18+
19+
Command | Description
20+
----------|----------
21+
[library](library.html) | You must run the library command with a related command.
22+
[library add](library-add.html) | Adds a native library to the current project.
23+
[plugin add](plugin-add.html) | Installs the specified plugin and its dependencies.
24+
[plugin remove](plugin-remove.html) | Uninstalls the specified plugin and its dependencies.
25+
<% } %>

0 commit comments

Comments
 (0)