Document version option for dependencies field in library.json

This commit is contained in:
Ivan Kravets
2016-08-26 14:44:45 +03:00
parent 054790d161
commit 8d8bfd5587
2 changed files with 19 additions and 4 deletions

View File

@ -401,6 +401,21 @@ Allowed requirements for dependent library:
* ``frameworks`` | Type: ``String`` or ``Array``
* ``platforms`` | Type: ``String`` or ``Array``
The ``version`` supports `Semantic Versioning <http://semver.org>`_ (
``<major>.<minor>.<patch>``) and can take any of the following forms:
* ``0.1.2`` - an exact version number. Use only this exact version
* ``^0.1.2`` - any compatible version (exact version for ``0.x.x`` versions
* ``~0.1.2`` - any version with the same major and minor versions, and an
equal or greater patch version
* ``>0.1.2`` - any version greater than ``0.1.2``. ``>=``, ``<``, and ``<=``
are also possible
* ``>0.1.0,!=0.2.0,<0.3.0`` - any version greater than ``0.1.0``, not equal to
``0.2.0`` and less than ``0.3.0``
The rest possible values including VCS repository URLs are documented in
:ref:`cmd_lib_install` command.
Example:
.. code-block:: javascript

View File

@ -52,11 +52,11 @@ class PlatformioCLI(click.MultiCommand): # pylint: disable=R0904
@staticmethod
def _handle_obsolate_command(name):
if name == "platforms":
from platformio.commands.platform import cli
return cli
from platformio.commands import platform
return platform.cli
elif name == "serialports":
from platformio.commands.device import cli
return cli
from platformio.commands import device
return device.cli
raise AttributeError()