Skip to content

Commit 1e2679b

Browse files
committed
Added support for a new "headers" field in "library.json"
1 parent 7b3abdb commit 1e2679b

File tree

1 file changed

+108
-92
lines changed

1 file changed

+108
-92
lines changed

librarymanager/config.rst

Lines changed: 108 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@ The keyword should be lowercased, can contain a-z, digits and dash (but not
9393
start/end with them). A list from the keywords can be specified with
9494
separator ``,`` or declared as Array.
9595

96+
``homepage``
97+
------------
98+
99+
*Optional* | Type: ``String`` | Max. Length: 255
100+
101+
Home page of a library (if is different from :ref:`libjson_repository` url).
102+
96103
.. _libjson_repository:
97104

98105
``repository``
@@ -118,7 +125,6 @@ Example:
118125
"url": "https://github.com/foo/bar.git"
119126
}
120127
121-
122128
.. _libjson_authors:
123129

124130
``authors``
@@ -177,75 +183,6 @@ A SPDX license ID of the library. You can check `the full list of SPDX license I
177183
178184
"license": "Apache-2.0"
179185
180-
``homepage``
181-
------------
182-
183-
*Optional* | Type: ``String`` | Max. Length: 255
184-
185-
Home page of a library (if is different from :ref:`libjson_repository` url).
186-
187-
.. _libjson_export:
188-
189-
``export``
190-
----------
191-
192-
*Optional* | Type: ``Object``
193-
194-
This option is useful if you need to exclude extra data (test code, docs, images, PDFs, etc).
195-
It allows one to reduce the size of the final archive.
196-
197-
To check which files will be included in the final packages, please use
198-
:ref:`cmd_package_pack` command.
199-
200-
Possible options:
201-
202-
.. contents::
203-
:local:
204-
205-
``include``
206-
~~~~~~~~~~~
207-
208-
*Optional* | Type: ``Array`` | `Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_
209-
210-
Export only files that matched declared patterns.
211-
212-
**Pattern Meaning**
213-
214-
.. list-table::
215-
:header-rows: 1
216-
217-
* - Pattern
218-
- Meaning
219-
* - ``*``
220-
- matches everything
221-
* - ``?``
222-
- matches any single character
223-
* - ``[seq]``
224-
- matches any character in seq
225-
* - ``[!seq]``
226-
- matches any character not in seq
227-
228-
Example:
229-
230-
.. code-block:: javascript
231-
232-
"export": {
233-
"include":
234-
[
235-
"dir/*.[ch]pp",
236-
"dir/examples/*",
237-
"*/*/*.h"
238-
]
239-
}
240-
241-
242-
``exclude``
243-
~~~~~~~~~~~
244-
245-
*Optional* | Type: ``Array`` | `Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_
246-
247-
Exclude the directories and files which match with ``exclude`` patterns.
248-
249186
.. _libjson_frameworks:
250187

251188
``frameworks``
@@ -297,6 +234,55 @@ use ``*`` symbol:
297234
See :ref:`ldf_compat_mode` for details. If you need a strict checking for compatible
298235
platforms for a library, please set :ref:`libjons_compatmode` to ``strict``.
299236

237+
``headers``
238+
-----------
239+
240+
*Optional* | Type: ``String`` or ``Array``
241+
242+
A list of header files that can be included in a project source files using
243+
``#include <...>`` directive.
244+
245+
Examples:
246+
247+
.. code-block:: javascript
248+
249+
"headers": "MyLibrary.h"
250+
251+
252+
.. code-block:: javascript
253+
254+
"headers": ["FooCore.h", "FooFeature.h"]
255+
256+
.. _libjson_examples:
257+
258+
``examples``
259+
------------
260+
261+
*Optional* | Type: ``Array`` | `Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_
262+
263+
A list of example patterns. This field is predefined with default value:
264+
265+
.. code-block:: javascript
266+
267+
"examples": [
268+
{
269+
"name": "Hello",
270+
"base": "examples/world",
271+
"files": [
272+
"platformio.ini",
273+
"include/world.h",
274+
"src/world.c",
275+
"README",
276+
"extra.py"
277+
]
278+
},
279+
{
280+
"name": "Blink",
281+
"base": "examples/blink",
282+
"files": ["blink.cpp", "blink.h"]
283+
}
284+
]
285+
300286
.. _libjson_dependencies:
301287

302288
``dependencies``
@@ -370,37 +356,67 @@ A short definition of dependencies is allowed:
370356
"external-zip": "https://github.com/me-no-dev/AsyncTCP/archive/master.zip"
371357
}
372358
359+
.. _libjson_export:
373360

374-
.. _libjson_examples:
361+
``export``
362+
----------
375363

376-
``examples``
377-
------------
364+
*Optional* | Type: ``Object``
365+
366+
This option is useful if you need to exclude extra data (test code, docs, images, PDFs, etc).
367+
It allows one to reduce the size of the final archive.
368+
369+
To check which files will be included in the final packages, please use
370+
:ref:`cmd_package_pack` command.
371+
372+
Possible options:
373+
374+
.. contents::
375+
:local:
376+
377+
``include``
378+
~~~~~~~~~~~
378379

379380
*Optional* | Type: ``Array`` | `Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_
380381

381-
A list of example patterns. This field is predefined with default value:
382+
Export only files that matched declared patterns.
383+
384+
**Pattern Meaning**
385+
386+
.. list-table::
387+
:header-rows: 1
388+
389+
* - Pattern
390+
- Meaning
391+
* - ``*``
392+
- matches everything
393+
* - ``?``
394+
- matches any single character
395+
* - ``[seq]``
396+
- matches any character in seq
397+
* - ``[!seq]``
398+
- matches any character not in seq
399+
400+
Example:
382401

383402
.. code-block:: javascript
384403
385-
"examples": [
386-
{
387-
"name": "Hello",
388-
"base": "examples/world",
389-
"files": [
390-
"platformio.ini",
391-
"include/world.h",
392-
"src/world.c",
393-
"README",
394-
"extra.py"
395-
]
396-
},
397-
{
398-
"name": "Blink",
399-
"base": "examples/blink",
400-
"files": ["blink.cpp", "blink.h"]
401-
}
402-
]
404+
"export": {
405+
"include":
406+
[
407+
"dir/*.[ch]pp",
408+
"dir/examples/*",
409+
"*/*/*.h"
410+
]
411+
}
412+
403413
414+
``exclude``
415+
~~~~~~~~~~~
416+
417+
*Optional* | Type: ``Array`` | `Glob Pattern <http://en.wikipedia.org/wiki/Glob_(programming)>`_
418+
419+
Exclude the directories and files which match with ``exclude`` patterns.
404420

405421
.. _libjson_build:
406422

0 commit comments

Comments
 (0)