UNPKG

3.39 kBPlain TextView Raw
1Synopsis
2
3 cordova-cli plugin <command> [options]
4
5Manage 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
29 remove <pluginid>|<name> [...] ..... Remove plugins with the given IDs/name and
30 removes the information for specified plugin from config.xml & package.json.
31 --nosave ....................... Prevents removing the information for
32 specified plugin from config.xml & package.json.
33
34
35 list .............................. List currently installed plugins
36 save .............................. Saves the information for all currently added plugins to config.xml
37
38 search [<keyword>] [...] .......... Search http://plugins.cordova.io for plugins matching the keywords
39
40Syntax
41 <plugin-spec> : <pluginID>[@<version>]|<directory>|<url>[#<commit-ish>][:subdir]
42
43 <plugin> .......................... Plugin id (id of plugin in npm registry or --searchPath)
44 <version> ......................... Major.minor.patch version specifier using semver
45 <directory> ....................... Directory containing plugin.xml
46 <url> ............................. Url to a git repository containing a plugin.xml
47 <commit-ish> ...................... Commit/tag/branch reference. If none is specified, 'master' is used
48 <subdir> .......................... Sub-directory to find plugin.xml for the specified plugin.
49
50Aliases
51 plugins -> plugin
52 rm -> remove
53 ls -> list
54
55Examples
56 cordova-cli plugin add cordova-plugin-camera cordova-plugin-file --nosave --searchpath ~/plugins
57 cordova-cli plugin add cordova-plugin-camera@^2.0.0 --nosave
58 cordova-cli plugin add https://github.com/myfork/cordova-plugin-camera.git#2.1.0 --nosave
59 cordova-cli plugin add ../cordova-plugin-camera --nosave
60 cordova-cli plugin add ../cordova-plugin-camera.tgz --nosave
61 cordova-cli plugin rm camera --nosave
62 cordova-cli plugin ls