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