Github user stevengill commented on a diff in the pull request: https://github.com/apache/cordova-docs/pull/689#discussion_r114087902 --- Diff: www/docs/en/dev/platform_plugin_versioning_ref/index.md --- @@ -51,43 +52,55 @@ After running the above command, the resulting config.xml looks like : ... </xml> ``` +After running the above command, the resulting package.json looks like : + +```bash +"cordova": {"platforms": ["android",]},"dependencies": {"cordova-android": "~4.0.0"} +``` +The '--nosave' flag prevents adding and deleting specified platforms from config.xml and package.json. To prevent saving a platform, you issue the following command : + +```bash +$ cordova platform add <platform[@<version>] | directory | git_url> --nosave +``` Some examples : - * **'cordova platform add android --save'** => retrieves the pinned version of the android platform, adds it to the project and then updates config.xml. - * **'cordova platform add android@3.7.0 --save'** => retrieves the android platform, version 3.7.0 from npm, adds it to the project and then updates config.xml. - * **'cordova platform add android@https://github.com/apache/cordova-android.gitâ --save'** => clones the specified cordova-android git repository, adds the android platform to the project, then updates config.xml and point its version to the specified git-url. - * **'cordova platform add C:/path/to/android/platform --save'** => retrieves the android platform from the specified directory, adds it to the project, then updates config.xml and point to the directory. + * **'cordova platform add android'** => retrieves the pinned version of the android platform, adds it to the project and then updates config.xml and package.json. + * **'cordova platform add android@3.7.0'** => retrieves the android platform, version 3.7.0 from npm, adds it to the project and then updates config.xml and package.json. + * **'cordova platform add android@https://github.com/apache/cordova-android.gitâ'** => clones the specified cordova-android git repository, adds the android platform to the project, then updates config.xml and package.json and points its version to the specified git-url. + * **'cordova platform add C:/path/to/android/platform'** => retrieves the android platform from the specified directory, adds it to the project, then updates config.xml and package.json and points to the directory. + * **'cordova platform add android --nosave'** => retrieves the pinned version of the android platform, adds it to the project, but does not add it to config.xml or package.json. + * **'cordova platform remove android --nosave'** => removes the android platform from the project, but does not remove it from config.xml or package.json. ### Mass saving platforms on an existing project -The '--save' flag described above is only useful when you remember to use it during the platform addition. + --- End diff -- delete the blank line
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org