Skip to content

Commit

Permalink
Add documentation for new fields
Browse files Browse the repository at this point in the history
Signed-off-by: Ulysse Gérard <[email protected]>
  • Loading branch information
voodoos committed Jun 18, 2021
1 parent a194195 commit dbe9e16
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions doc/dune-files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1858,7 +1858,7 @@ Note that this feature is still experimental and needs to be enabled in your

.. code:: scheme
(using mdx 0.1)
(using mdx 0.2) ; Version 0.2 of the stanza requires mdx >= 1.9.0
The syntax is as follows:

Expand All @@ -1872,23 +1872,30 @@ Where ``<optional-fields>`` are:
list of globs (see the :ref:`Glob language specification <glob>` ).
It defaults to ``*.md``.

- ``(packages <packages>)`` are the local dune packages that your documentation
code blocks depend on. I.e. if your documentation examples depend on a public
executable or library defined from a local package, it has to be specified in
the stanza.
- ``(deps <deps-conf list>)`` (since version 0.2) to specify the dependencies
of your documentation code blocks. See the :ref:`deps-field` section for more
details.

- ``(packages <packages>)`` (deprecated in version 0.2) are the local dune
packages that your documentation code blocks depend on. I.e. if your
documentation examples depend on a public executable or library defined from
a local package, it has to be specified in the stanza.

- ``(preludes <files>)`` are the prelude files you want to pass to MDX.
See `MDX's documentation <https://github.com/realworldocaml/mdx>`__ for more
details on preludes.

- ``(libraries <files>)`` (since version 0.2) are libraries that should be
statically linked in the MDX test executable.

- ``(enabled_if <blang expression>)`` is the same as the corresponding field of
`library`_.

- ``(package <package>)`` specifies which package to attach this stanza to
(similarly to when ``(package)`` is attached to a ``(rule)`` stanza. When
``-p`` is passed, ``(mdx)`` stanzas with an other package will be ignored.
Note that this is feature is completely separate from ``(packages)``, which
specifies some dependencies.
- ``(package <package>)`` (since Dune 2.9) specifies which package to attach
this stanza to (similarly to when ``(package)`` is attached to a ``(rule)``
stanza. When ``-p`` is passed, ``(mdx)`` stanzas with an other package will
be ignored. Note that this is feature is completely separate from
``(packages)``, which specifies some dependencies.

.. _plugin:

Expand Down

0 comments on commit dbe9e16

Please sign in to comment.