1 | Synopsis
|
2 |
|
3 | cordova-cli plugin <command> [options]
|
4 |
|
5 | Manage project plugins
|
6 |
|
7 | add <plugin-spec> [...] ............ Add specified plugins and save them to
|
8 | config.xml & package.json.
|
9 | --searchpath <directory> ....... When looking up plugins by ID, look in this directory and
|
10 | each of its subdirectories before hitting the registry.
|
11 | Multiple search paths can be specified.
|
12 |
|
13 | --noregistry ................... Don't search the registry for plugins
|
14 |
|
15 | --link ......................... When installing from a local path, creates a symbolic link
|
16 | instead of copying files. The extent to which files are linked
|
17 | varies by platform. Useful for plugin development.
|
18 | --nosave ....................... Prevent saving the information for specified plugin
|
19 | into config.xml & package.json.
|
20 | --shrinkwrap ................... Used together with --save, saves the
|
21 | installed version numbers to config.xml
|
22 | --browserify ................... Compile plugin JS at build time using
|
23 | browserify instead of runtime.
|
24 |
|
25 | --force ........................ Forces copying source files from the plugin even if the
|
26 | same file already exists in the target directory.
|
27 |
|
28 | --nofetch ...................... Prevents fetching the plugin into the project's
|
29 | node_modules directory. Prevents using
|
30 | `npm install` to do the fetching.
|
31 |
|
32 | remove <pluginid>|<name> [...] ..... Remove plugins with the given IDs/name and
|
33 | removes the information for specified plugin from config.xml & package.json.
|
34 | --nosave ....................... Prevents removing the information for
|
35 | specified plugin from config.xml & package.json.
|
36 |
|
37 | --nofetch ...................... Prevents removing the plugin from the project's
|
38 | node_modules directory. Prevents using
|
39 | `npm uninstall` under the hood.
|
40 |
|
41 |
|
42 | list .............................. List currently installed plugins
|
43 | save .............................. Saves the information for all currently added plugins to config.xml
|
44 |
|
45 | search [<keyword>] [...] .......... Search http://plugins.cordova.io for plugins matching the keywords
|
46 |
|
47 | Syntax
|
48 | <plugin-spec> : <pluginID>[@<version>]|<directory>|<url>[#<commit-ish>][:subdir]
|
49 |
|
50 | <plugin> .......................... Plugin id (id of plugin in npm registry or --searchPath)
|
51 | <version> ......................... Major.minor.patch version specifier using semver
|
52 | <directory> ....................... Directory containing plugin.xml
|
53 | <url> ............................. Url to a git repository containing a plugin.xml
|
54 | <commit-ish> ...................... Commit/tag/branch reference. If none is specified, 'master' is used
|
55 | <subdir> .......................... Sub-directory to find plugin.xml for the specified plugin.
|
56 |
|
57 | Aliases
|
58 | plugins -> plugin
|
59 | rm -> remove
|
60 | ls -> list
|
61 |
|
62 | Examples
|
63 | cordova-cli plugin add cordova-plugin-camera cordova-plugin-file --nosave --searchpath ~/plugins
|
64 | cordova-cli plugin add cordova-plugin-camera@^2.0.0 --nosave
|
65 | cordova-cli plugin add https://github.com/myfork/cordova-plugin-camera.git#2.1.0 --nosave
|
66 | cordova-cli plugin add ../cordova-plugin-camera --nosave
|
67 | cordova-cli plugin add ../cordova-plugin-camera.tgz --nosave
|
68 | cordova-cli plugin rm camera --nosave
|
69 | cordova-cli plugin ls
|
70 | cordova-cli plugin add cordova-plugin-camera --nofetch
|
71 | cordova-cli plugin rm cordova-plugin-camera --nofetch
|