Skip to content

Commit

Permalink
[FEATURE] Document how to Regenerate existing code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
linawolf committed May 17, 2024
1 parent 40d3e0d commit 1f41441
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 5 deletions.
60 changes: 60 additions & 0 deletions Documentation/Maintainers/Codesnippets.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
.. include:: /Includes.rst.txt
.. _codesnippet-generation:

=======================
Code snippet generation
=======================

.. todo: Document how to create additional code snippets
.. _codesnippet-regeneration:

Regenerate existing code snippets
=================================

To regenerate the existing code snippets in a manual or extension clone
the repository of that manual.

.. code-block:: bash
git clone [email protected]:TYPO3-Documentation/TYPO3CMS-Reference-CoreApi.git
Use composer to install all dependencies,
including dev-dependencies. In official manuals we have a make command for
your convenience.

.. tabs::

.. tab:: Make

.. code-block:: bash
make install
.. tab:: composer

.. code-block:: bash
# in repositories where the composer.lock is not in version control
composer update
Then regenerate the code snippets. Official manuals should have a make command
for that.

.. tabs::

.. tab:: Make

.. code-block:: bash
make codesnippets
.. tab:: TYPO3 console command

.. code-block:: bash
# Paths depends on where the vendor binaries are installed
# And where the configuration file codesnippets.php is located
vendor/bin/typo3 codesnippet:create Documentation/
7 changes: 2 additions & 5 deletions Documentation/Maintainers/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@ For maintainers
===============

.. toctree::
:glob:
:maxdepth: 1

BackportChanges
FluidViewHelper
Changelog
NewMajorCoreVersion
Tools
*

0 comments on commit 1f41441

Please sign in to comment.