cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nikhilkh <>
Subject [GitHub] cordova-docs pull request: CB-10679: Adding docs for new plugin ve...
Date Fri, 18 Mar 2016 00:20:18 GMT
Github user nikhilkh commented on a diff in the pull request:
    --- Diff: www/docs/en/dev/guide/hybrid/plugins/ ---
    @@ -239,3 +239,105 @@ For example, for a plugin that supports android, iOS & Windows,
the keywords in
     For more detailed example of a package.json, review the [package.json file of cordova-plugin-device](
    +### Specifying Cordova Dependencies
    +**Cordova 6.1.0** added support for specifying the Cordova-related dependencies of a
    +as part of the plugin's `package.json` file. Plugins may list the dependencies for multiple
    +releases so as to provide guidance to the Cordova CLI when it is selecting the version
of a
    +plugin to fetch from npm. The CLI will choose the latest release of a plugin that is
    +compatible with the local project's installed platforms and plugins as well as the
    +the local Cordova CLI version. If no releases of the plugin are compatible, the CLI will
    +the user about the failed requirements and fall back to the old behavior of fetching
    +latest release.
    +This feature is intended to eventually replace the [engines element](../../../plugin_ref/spec.html#engines-and-engine)
in plugin.xml.
    +Listing dependencies is a good way to ensure that your plugin will not appear broken
or cause
    +build errors when fetched from npm. If the latest release of the plugin is not compatible
    +a project, the CLI will give the app developer a list of unmet project requirements so
    +they are aware of incompatibilites and can update their project to support your plugin.
    +allows your plugin to respond to breaking changes without fear of confusing devlopers
    +are building against old platforms and plugins.
    +To specify Cordova-related dependencies for a plugin, alter the `engines` element in
    +`package.json` to include a `cordovaDependencies` object using the following
    +engines: {
    +    cordovaDependencies: {
    +        PLUGIN_VERSION: {
    +            DEPENDENCY: SEMVER_RANGE,
    +            DEPENDENCY: SEMVER_RANGE,
    +            ...
    +        },
    +        ...
    +    }
    +* `PLUGIN_VERSION` specifies a version of your plugin. It should adhere the syntax for
a single version as defined by [npm's semver package][npm-semver] or an upper bound (see [below](#upper-bounds))
    --- End diff --
    Nit: You could as well hyper-link "upper bound"

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message