mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Document version
option for dependencies
field in library.json
This commit is contained in:
@ -401,6 +401,21 @@ Allowed requirements for dependent library:
|
|||||||
* ``frameworks`` | Type: ``String`` or ``Array``
|
* ``frameworks`` | Type: ``String`` or ``Array``
|
||||||
* ``platforms`` | 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:
|
Example:
|
||||||
|
|
||||||
.. code-block:: javascript
|
.. code-block:: javascript
|
||||||
|
@ -52,11 +52,11 @@ class PlatformioCLI(click.MultiCommand): # pylint: disable=R0904
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def _handle_obsolate_command(name):
|
def _handle_obsolate_command(name):
|
||||||
if name == "platforms":
|
if name == "platforms":
|
||||||
from platformio.commands.platform import cli
|
from platformio.commands import platform
|
||||||
return cli
|
return platform.cli
|
||||||
elif name == "serialports":
|
elif name == "serialports":
|
||||||
from platformio.commands.device import cli
|
from platformio.commands import device
|
||||||
return cli
|
return device.cli
|
||||||
raise AttributeError()
|
raise AttributeError()
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user