NiklasMerz commented on code in PR #1314: URL: https://github.com/apache/cordova-docs/pull/1314#discussion_r1206295951
########## www/docs/en/dev/platform_plugin_versioning_ref/index.md: ########## @@ -57,29 +59,76 @@ After running the above command, the **`package.json`** should contain something } ``` -The `--nosave` flag prevents adding and deleting specified platforms to the `package.json` file. To prevent saving a platform, issue the following command: +The `--nosave` flag prevents adding and deleting the specified platform from the `package.json` file. + +Example: ```bash cordova platform add <platform[@<version>] | directory | git_url> --nosave ``` -Some Examples: +Here are various ways to add platforms. -* **`cordova platform add android`** +*Adding with Cordova resolved name:* - Retrieves the pinned version of `cordova-android` platform from npm, adds it to the project and updates the `package.json` file. +Example: -* **`cordova platform add [email protected]`** +```bash +cordova platform add android +``` - Retrieves the `cordova-android` platform version `7.1.4` from npm, adds it to the project and updates the `package.json` file. +The avaialble Cordova Resolved names are: -* **`cordova platform add https://github.com/apache/cordova-android.git`** - - **`cordova platform add https://github.com/apache/cordova-android`** - - **`cordova platform add github:apache/cordova-android`** +* `android` +* `electron` +* `ios` +* `browser` + + +The latest version of the `cordova-android` platform will be fetched from npm, added to the project and the `package.json` file will be updated. + +*Adding with Cordova resolved name and pinned version:* + +Example: + +```bash +cordova platform add [email protected] +``` + +The `cordova-android` platform at version `7.1.4` will be fetched from npm, added to the project and updates the `package.json` file. + +*Adding with npm package name:* + +Example: + +```bash +cordova platform add cordova-android +``` + +The `cordova-android` platform will be fetched from npm, added to the project and updates the `package.json` file. Review Comment: ```suggestion The `cordova-android` platform will be fetched from npm, added to the project and the `package.json` file will be updated. ``` ########## www/docs/en/dev/platform_plugin_versioning_ref/index.md: ########## @@ -57,29 +59,76 @@ After running the above command, the **`package.json`** should contain something } ``` -The `--nosave` flag prevents adding and deleting specified platforms to the `package.json` file. To prevent saving a platform, issue the following command: +The `--nosave` flag prevents adding and deleting the specified platform from the `package.json` file. + +Example: ```bash cordova platform add <platform[@<version>] | directory | git_url> --nosave ``` -Some Examples: +Here are various ways to add platforms. -* **`cordova platform add android`** +*Adding with Cordova resolved name:* - Retrieves the pinned version of `cordova-android` platform from npm, adds it to the project and updates the `package.json` file. +Example: -* **`cordova platform add [email protected]`** +```bash +cordova platform add android +``` - Retrieves the `cordova-android` platform version `7.1.4` from npm, adds it to the project and updates the `package.json` file. +The avaialble Cordova Resolved names are: -* **`cordova platform add https://github.com/apache/cordova-android.git`** - - **`cordova platform add https://github.com/apache/cordova-android`** - - **`cordova platform add github:apache/cordova-android`** +* `android` +* `electron` +* `ios` +* `browser` + + +The latest version of the `cordova-android` platform will be fetched from npm, added to the project and the `package.json` file will be updated. + +*Adding with Cordova resolved name and pinned version:* + +Example: + +```bash +cordova platform add [email protected] +``` + +The `cordova-android` platform at version `7.1.4` will be fetched from npm, added to the project and updates the `package.json` file. Review Comment: ```suggestion The `cordova-android` platform at version `7.1.4` will be fetched from npm, added to the project and the `package.json` file will be updaed. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
