UNPKG

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