Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
3124e2f
[FEATURE] Add Rst Exporter to generate documentation in rst format
Oct 1, 2018
aebc70d
Improve backpath and some cosmetic for headlines (not finished)
Oct 1, 2018
46a91d9
[BUGFIX] Pass the forceUpdate parameter into the Exporter
Oct 2, 2018
e1232e9
[TASK] Adjust tests
Oct 2, 2018
b6672f8
[TASK] Add config for travis
Oct 2, 2018
ff74a20
[TASK] Add Travis-CI and Coveralls Build status images
Oct 2, 2018
9288f31
[BUGFIX] Lowercase tests folder as configured
Oct 2, 2018
3536d33
[TASK] Add scrutinizer badge
maddy2101 Oct 3, 2018
03d5096
[TASK] Provide Test file structure for rendering tests
Oct 4, 2018
fffb1bd
[TASK] Clean up tests for root Index.rst generation test
Oct 4, 2018
b301385
[TASK] Correct headline in root Index.rst
Oct 4, 2018
3dfb857
[TASK] Headline decoration is same length as headline
Oct 4, 2018
7605541
[TASK] Headline decoration must only contain equal signs
Oct 4, 2018
0012292
[TASK] Clarify fixture files for rst rendering
Oct 4, 2018
a031e64
[TASK] Render tocTree part of root Index.rst
Oct 4, 2018
8775730
[TASK] Generated Root Index.rst is the same as fixture file
Oct 4, 2018
d47d36e
[TASK] Generated file structure complies to fixture
Oct 4, 2018
6b5c562
[TASK] Remove unused variable in test
Oct 6, 2018
2385c9a
[TASK] Schema Index.rst contains proper headline
Oct 6, 2018
374f477
[TASK] Includes.txt is included correctly
Oct 6, 2018
1fed55b
[TASK] Headline decoration has equal length as headline
Oct 6, 2018
6e7b5b9
[TASK] ViewHelper Count is integrated
Oct 6, 2018
6276508
[TASK] Sub Namespaces Count is integrated
Oct 6, 2018
81db21b
[TASK] Toctree gets correct values
Oct 6, 2018
8fcf06f
[TASK] Test for first level VH documentation
Oct 6, 2018
517e0ea
[TASK] Move setup to top of test files
Oct 6, 2018
39da3b3
[TASK] Add Tests for Includes.txt and headline
Oct 6, 2018
835f940
[TASK] Add Tests for Description
Oct 6, 2018
1b9e2ba
[TASK] Prepare fixture file for test
Oct 6, 2018
b379d50
[TASK] First Level ViewHelper gets rendered as expected
Oct 6, 2018
be7d25d
[TASK] Remove dead code
Oct 6, 2018
5a70a02
[TASK] ViewHelperGroup Index.rst gets rendered
Oct 6, 2018
416c864
[TASK] ViewHelperGroup Index.rst without subgroups gets rendered
Oct 6, 2018
ceb9086
[TASK] ViewHelpers in Sub Groups get rendered as expected
Oct 6, 2018
75d87e5
[BUGFIX] Toctree must intend by 3 spaces
Oct 6, 2018
7d4df39
[BUGFIX] Adjust output for nice rendering
Oct 6, 2018
d054fee
[TASK] Separate rst rendering related tests
Oct 7, 2018
d3a2f09
[TASK] Clean up code
Oct 7, 2018
5f5d5f9
[TASK] Provide Fixture files fresh from a real generation
Oct 7, 2018
c6ae32a
TASK: Add disclaimer and introduction
DanielSiepmann Feb 11, 2019
5eaac77
[TASK] Add .idea/ to .gitignore
lolli42 Feb 18, 2019
2141afd
Merge pull request #1 from DanielSiepmann/feature/update-for-docs-typ…
lolli42 Feb 18, 2019
53399a3
[TASK] Fix unit tests after Index.rst change
lolli42 Feb 18, 2019
47a19ab
Improve index file
DanielSiepmann Apr 5, 2019
4de4d23
Merge pull request #2 from maddy2101/feature/fix-root-template
DanielSiepmann Apr 5, 2019
54910e4
[FEATURE] Add further information
DanielSiepmann Jun 22, 2019
32794fe
Merge pull request #3 from maddy2101/feature/add-further-information
maddy2101 Jul 3, 2019
418fcd0
[BUGFIX] Fix casing of package mikey179/vfsstream
andreaskienast Dec 15, 2020
015a1ba
Merge pull request #5 from andreasfernandez/master
maddy2101 Dec 15, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
composer.lock
vendor/
public/*
!public/.keep
cache/*
!cache/.keep
schemas/*
!schemas/.keep
build/logs/
.idea/
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: php

sudo: false

php:
- "7.1"
- "7.2"

cache:
directories:
- $HOME/.composer/cache

install: composer install

script:
- vendor/bin/phpunit

after_script:
- travis_retry php vendor/bin/php-coveralls -v
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[![Build Status](https://travis-ci.com/maddy2101/fluid-documentation-generator.svg?branch=master)](https://travis-ci.com/maddy2101/fluid-documentation-generator)
[![Coverage Status](https://coveralls.io/repos/github/maddy2101/fluid-documentation-generator/badge.svg?branch=master)](https://coveralls.io/github/maddy2101/fluid-documentation-generator?branch=master)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/maddy2101/fluid-documentation-generator/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/maddy2101/fluid-documentation-generator/?branch=master)

Fluid (ViewHelper) Documentation Generator
==========================================

Expand Down
2 changes: 2 additions & 0 deletions bin/generate-fluid-documentation
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ require_once $pwd . DIRECTORY_SEPARATOR . 'vendor/autoload.php';
use NamelessCoder\FluidDocumentationGenerator\Data\DataFileResolver;
use NamelessCoder\FluidDocumentationGenerator\Export\HtmlExporter;
use NamelessCoder\FluidDocumentationGenerator\Export\JsonExporter;
use NamelessCoder\FluidDocumentationGenerator\Export\RstExporter;
use NamelessCoder\FluidDocumentationGenerator\Export\XsdExporter;
use NamelessCoder\FluidDocumentationGenerator\Entity\Schema;
use NamelessCoder\FluidDocumentationGenerator\SchemaDocumentationGenerator;
Expand All @@ -22,6 +23,7 @@ $exporters = [
new XsdExporter($publicUrlPrefix),
new JsonExporter($publicUrlPrefix),
new HtmlExporter($publicUrlPrefix),
new RstExporter($publicUrlPrefix)
];
$generator = SchemaDocumentationGenerator::getInstance($exporters, $force);
$generator->generateFilesForRoot();
Expand Down
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
"bin/generate-fluid-documentation.php"
],
"require-dev": {
"ext-json": "*",
"phpunit/phpunit": "^7.1",
"mikey179/vfsStream": "^1.6"
"mikey179/vfsstream": "^1.6",
"php-coveralls/php-coveralls": "^2.1"
}
}
48 changes: 26 additions & 22 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="false"
convertErrorsToExceptions="false"
convertWarningsToExceptions="false"
forceCoversAnnotation="false"
processIsolation="false"
stopOnError="true"
stopOnFailure="true"
stopOnIncomplete="false"
stopOnSkipped="false"
verbose="false">
backupGlobals="false"
backupStaticAttributes="false"
colors="false"
convertErrorsToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
verbose="false">

<testsuites>
<testsuite name="FluidDocumentationGenerator">
<directory>tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>src/</directory>
</whitelist>
</filter>
<testsuites>
<testsuite name="FluidDocumentationGenerator">
<directory>tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>src/</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
</phpunit>
31 changes: 31 additions & 0 deletions resources/templates/Default/Root.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
.. include:: Includes.txt

.. _start:

==============================
Fluid ViewHelper Documentation
==============================

:Rendered: |today|

This is a complete reference of all available Fluid ViewHelper within TYPO3 CMS.
This documentation is generated from PHP Source code of TYPO3 CMS.

This reference is auto generated from TYPO3 CMS 9.5 source code. Right now there is no
auto generation for TYPO3 versions below 9.5. You can find a hand written reference
for 6.2 at https://docs.typo3.org/typo3cms/ExtbaseGuide/6.2/Fluid/ViewHelper/Index.html.

Right now this might look ugly in some places, e.g. ``= EXAMPLE =`` and rendered
HTML markup like ``<code>``. This will be polished in the future. The current
state still is much better then nothing.

Also notice that package names are not 1:1 Composer packages. ``cms-`` is
striped.

Content
-------

.. toctree::
:titlesonly:

<f:for each="{tocTree}" as="line">{line}</f:for>
14 changes: 14 additions & 0 deletions resources/templates/Default/Schema.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. include:: {rootPath}Includes.txt

{headlineDecoration}
{headline}
{headlineDecoration}

* {viewHelpers} ViewHelpers documented
* {subGroups} Sub namespaces

.. toctree::
:titlesonly:
:glob:

<f:for each="{tocTree}" as="line">{line}</f:for>
35 changes: 35 additions & 0 deletions resources/templates/Default/ViewHelper.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.. include:: {rootPath}Includes.txt

.. _{headlineIdentifier}:

{headlineDecoration}
{headline}
{headlineDecoration}


{viewHelper.description -> f:format.raw()}

Arguments
=========


<f:spaceless>
<f:if condition="{arguments -> f:count()} == 0">This ViewHelper has no arguments.</f:if>

<f:for each="{arguments}" as="argumentData">
.. _{argumentData.headlineIdentifier}:
{argumentData.headline}
{argumentData.headlineDecoration}
<f:if condition="{argumentData.dataType}">
:aspect:`DataType`
{argumentData.dataType}
</f:if><f:if condition="{argumentData.default}">
:aspect:`Default`
{argumentData.default -> f:format.raw()}
</f:if>
:aspect:`Required`
{argumentData.isRequired ? 'true' : 'false'}
:aspect:`Description`
{argumentData.description -> f:format.raw()}
</f:for>
</f:spaceless>
19 changes: 19 additions & 0 deletions resources/templates/Default/ViewHelperGroup.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. include:: {rootPath}Includes.txt

{headlineDecoration}
{headline}
{headlineDecoration}


<f:spaceless>
* {viewHelpers} ViewHelpers documented
<f:if condition="{subGroups} > 0">* {subGroups} Sub namespaces</f:if>
</f:spaceless>

.. toctree::
:titlesonly:
:glob:

<f:for each="{tocTree}" as="line">{line}</f:for>


5 changes: 3 additions & 2 deletions src/Export/ExporterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

namespace NamelessCoder\FluidDocumentationGenerator\Export;

use NamelessCoder\FluidDocumentationGenerator\ProcessedSchema;
use NamelessCoder\FluidDocumentationGenerator\Entity\SchemaPackage;
use NamelessCoder\FluidDocumentationGenerator\Entity\SchemaVendor;
use NamelessCoder\FluidDocumentationGenerator\ProcessedSchema;
use NamelessCoder\FluidDocumentationGenerator\SchemaDocumentationGenerator;
use NamelessCoder\FluidDocumentationGenerator\ViewHelperDocumentation;
use NamelessCoder\FluidDocumentationGenerator\ViewHelperDocumentationGroup;
Expand All @@ -14,7 +14,8 @@ interface ExporterInterface
{
public function getIdentifier(): string;
public function setGenerator(SchemaDocumentationGenerator $generator): void;
public function exportRoot(): void;

public function exportRoot(bool $forceUpdate): void;
public function exportVendor(SchemaVendor $vendor): void;
public function exportPackage(SchemaPackage $package): void;
public function exportSchema(ProcessedSchema $processedSchema, bool $forceUpdate = false): void;
Expand Down
4 changes: 2 additions & 2 deletions src/Export/JsonExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
use NamelessCoder\FluidDocumentationGenerator\Data\DataFileResolver;
use NamelessCoder\FluidDocumentationGenerator\Data\GraphDataHandler;
use NamelessCoder\FluidDocumentationGenerator\Entity\Schema;
use NamelessCoder\FluidDocumentationGenerator\ProcessedSchema;
use NamelessCoder\FluidDocumentationGenerator\Entity\SchemaPackage;
use NamelessCoder\FluidDocumentationGenerator\Entity\SchemaVendor;
use NamelessCoder\FluidDocumentationGenerator\ProcessedSchema;
use NamelessCoder\FluidDocumentationGenerator\SchemaDocumentationGenerator;
use NamelessCoder\FluidDocumentationGenerator\ViewHelperDocumentation;
use NamelessCoder\FluidDocumentationGenerator\ViewHelperDocumentationGroup;
Expand Down Expand Up @@ -53,7 +53,7 @@ public function createAdditionalSchemaResources(ProcessedSchema $schema, ?string
];
}

public function exportRoot(): void
public function exportRoot(bool $forceUpdate): void
{
$resolver = DataFileResolver::getInstance();
$index = [];
Expand Down
Loading