UNPKG

3.12 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
23 --force ........................ Forces copying source files from the plugin even if the
24 same file already exists in the target directory.
25
26
27 remove <pluginid>|<name> [...] ..... Remove plugins with the given IDs/name and
28 removes the information for specified plugin from config.xml & package.json.
29 --nosave ....................... Prevents removing the information for
30 specified plugin from config.xml & package.json.
31
32
33 list .............................. List currently installed plugins
34 save .............................. Saves the information for all currently added plugins to config.xml
35
36Syntax
37 <plugin-spec> : <pluginID>[@<version>]|<directory>|<url>[#<commit-ish>][:subdir]
38
39 <plugin> .......................... Plugin id (id of plugin in npm registry or --searchPath)
40 <version> ......................... Major.minor.patch version specifier using semver
41 <directory> ....................... Directory containing plugin.xml
42 <url> ............................. Url to a git repository containing a plugin.xml
43 <commit-ish> ...................... Commit/tag/branch reference. If none is specified, 'master' is used
44 <subdir> .......................... Sub-directory to find plugin.xml for the specified plugin.
45
46Aliases
47 plugins -> plugin
48 rm -> remove
49 ls -> list
50
51Examples
52 cordova-cli plugin add cordova-plugin-camera cordova-plugin-file --nosave --searchpath ~/plugins
53 cordova-cli plugin add cordova-plugin-camera@^2.0.0 --nosave
54 cordova-cli plugin add https://github.com/myfork/cordova-plugin-camera.git#2.1.0 --nosave
55 cordova-cli plugin add ../cordova-plugin-camera --nosave
56 cordova-cli plugin add ../cordova-plugin-camera.tgz --nosave
57 cordova-cli plugin rm camera --nosave
58 cordova-cli plugin ls