1 | Synopsis
|
2 |
|
3 | cordova-cli platform <command> [options]
|
4 |
|
5 | Manage project platforms
|
6 |
|
7 | add <plat-spec> [...].............. Add specified platforms and save platforms
|
8 | into config.xml & package.json after installing them
|
9 |
|
10 | --nosave ...................... Prevent saving platforms into
|
11 | config.xml & package.json after installing them
|
12 |
|
13 | --link ........................ When <plat-spec> is a local path, links the platform
|
14 | library directly instead of making a copy of it (support
|
15 | varies by platform; useful for platform development)
|
16 |
|
17 | --nofetch ..................... Prevent fetching the plugin into the project's node_modules
|
18 | directory. Uses older fetching method (pre cordova-7)
|
19 | instead of using npm install under the hood
|
20 |
|
21 | remove <platform> [...] ........... Remove specified platforms
|
22 |
|
23 | --nosave ...................... Prevent deleting specified platforms from
|
24 | config.xml & package.json after removing them
|
25 | --nofetch ..................... Prevent removing the plugin from the project's node_modules
|
26 | directory. Uses older fetching method (pre cordova-7)
|
27 | instead of using npm install under the hood
|
28 |
|
29 | update <plat-spec> ................ Update the version of Cordova used for a specific platform;
|
30 | update to the latest <version> if no <plat-spec> is specified
|
31 |
|
32 | list .............................. List all installed and available platforms
|
33 | check ............................. List platforms which can be updated by `cordova-cli platform update`
|
34 | nosave ............................ Prevents saving version of all platforms added to
|
35 | config.xml & package.json
|
36 | Syntax
|
37 | <plat-spec> : <platform>[@<version>]|<path>|<url>[#<commit-ish>]
|
38 |
|
39 | <platform> ........................ Platform name e.g. android, ios, windows etc.
|
40 | <version> ......................... Major.minor.patch version specifier using semver
|
41 | <path> ............................ Path to a directory containing a platform
|
42 | <url> ............................. Url to a git repository containing a platform
|
43 | <commit-ish> ...................... Commit/tag/bramch reference. If none is specified, 'master' is used
|
44 |
|
45 | Aliases
|
46 | platforms -> platform
|
47 | rm -> remove
|
48 | ls -> list
|
49 |
|
50 | Examples
|
51 | cordova-cli platform add android ios
|
52 | cordova-cli platform add android@^5.0.0
|
53 | cordova-cli platform add https://github.com/myfork/cordova-android.git#4.0.0
|
54 | cordova-cli platform add ../android
|
55 | cordova-cli platform add ../cordova-android.tgz
|
56 | cordova-cli platform rm android --nosave
|
57 | cordova-cli platform ls
|
58 | cordova-cli platform add android --nofetch
|
59 | cordova-cli platform rm android --nofetch
|