Skip to content

Commit

Permalink
Merge pull request #3 from bumble-tech/1.x.x
Browse files Browse the repository at this point in the history
1.0.0
  • Loading branch information
shcherbanich authored Sep 11, 2023
2 parents 83ea8c0 + aa933fc commit a112fa8
Show file tree
Hide file tree
Showing 549 changed files with 26,217 additions and 3,457 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
composer.phar
/vendor/
.idea
/SelfDoc/__cache/
/demo/demo1/docs/
/demo/demo1/__cache/
/demo/demo2-templates-generation/__cache/
Expand All @@ -13,3 +12,4 @@ composer.phar
/last_run.log
/.phpunit.result.cache
/demo/demo2-templates-generation/templates/
/.bumbleDocGenCache/
25 changes: 0 additions & 25 deletions SelfDoc/Configuration/config.yaml

This file was deleted.

17 changes: 0 additions & 17 deletions SelfDoc/Console/App.php

This file was deleted.

42 changes: 0 additions & 42 deletions SelfDoc/Console/Command/GenerateCommand.php

This file was deleted.

8 changes: 0 additions & 8 deletions SelfDoc/docGen.php

This file was deleted.

22 changes: 22 additions & 0 deletions bin/bumbleDocGen
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env php
<?php

ini_set('memory_limit', '-1');

$dir = __DIR__;
$autoloadFound = false;
while ($dir !== DIRECTORY_SEPARATOR) {
$autoloadFileName = realpath($dir . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php');
$autoloadFound = file_exists($autoloadFileName) && is_readable($autoloadFileName);
if ($autoloadFound) {
require $autoloadFileName;
break;
}
$dir = dirname($dir);
}

if (!$autoloadFound) {
die('Composer autoload.php file not found.');
}

(new \BumbleDocGen\Console\App())->run();
27 changes: 27 additions & 0 deletions bumble_doc_gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
project_root: '%WORKING_DIR%'
templates_dir: '%project_root%/selfdoc/templates'
output_dir: "%project_root%/docs"
cache_dir: '%project_root%/.bumbleDocGenCache'
output_dir_base_url: "/docs"
language_handlers:
php:
class: \BumbleDocGen\LanguageHandler\Php\PhpHandler
settings:
file_source_base_url: 'https://github.com/bumble-tech/bumble-doc-gen/blob/master'
async_source_loading_enabled: true
source_locators:
- class: \BumbleDocGen\Core\Parser\SourceLocator\RecursiveDirectoriesSourceLocator
arguments:
directories:
- "%project_root%/src"
- "%project_root%/selfdoc"
twig_filters:
- class: \SelfDocConfig\Twig\CustomFilter\EvalString
twig_functions:
- class: \SelfDocConfig\Twig\CustomFunction\FindEntitiesClassesByCollectionClassName
- class: \SelfDocConfig\Twig\CustomFunction\PrintClassCollectionAsGroupedTable
- class: \SelfDocConfig\Twig\CustomFunction\GetConfigParametersDescription
plugins:
- class: \SelfDocConfig\Plugin\RoaveStubber\BetterReflectionStubberPlugin
- class: \SelfDocConfig\Plugin\TwigFilterClassParser\TwigFilterClassParserPlugin
- class: \SelfDocConfig\Plugin\TwigFunctionClassParser\TwigFunctionClassParserPlugin
11 changes: 7 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,25 @@
},
"autoload": {
"psr-4": {
"BumbleDocGen\\": "BumbleDocGen/"
"BumbleDocGen\\": "src/"
},
"files": [
"BumbleDocGen/Core/utils.php"
"src/Core/utils.php"
]
},
"autoload-dev": {
"psr-4": {
"Test\\": "tests/",
"SelfDoc\\": "SelfDoc/"
"SelfDocConfig\\": "selfdoc/"
}
},
"config": {
"allow-plugins": {
"php-http/discovery": true,
"captainhook/plugin-composer": true
}
}
},
"bin": [
"bin/bumbleDocGen"
]
}
19 changes: 17 additions & 2 deletions docs/readme.md → docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ BumbleDocGen's interface consists of mainly two classes: <a href="/docs/classes/

<embed> <h3>Examples of usage</h3> </embed>

1) Working with a library in a PHP file

```php
require_once 'vendor/autoload.php';

Expand All @@ -64,18 +66,31 @@ $docgen = $factory->create('/path/to/configuration/files');
$docgen->generate();
```

2) Working with the library through a console application

```bash
# List of available commands
./vendor/bin/bumbleDocGen list

# Documentation generation example
./vendor/bin/bumbleDocGen generate -c <path to config file>

# Getting detailed information about a command
./vendor/bin/bumbleDocGen generate -h
```

------------------

**This documentation was generated using the Bumble Documentation Generator, and is an example of how it works.**

To update this documentation, run the following command:

```console
php SelfDoc/docGen.php generate
./bin/bumbleDocGen generate
```



<div id='page_committer_info'>
<hr>
<b>Last page committer:</b> fshcherbanich &lt;[email protected]&gt;<br><b>Last modified date:</b> Sun Jul 30 16:49:10 2023 +0300<br><b>Page content update date:</b> Thu Aug 31 2023<br>Made with <a href='https://github.com/bumble-tech/bumble-doc-gen/blob/master/docs/readme.md'>Bumble Documentation Generator</div>
<b>Last page committer:</b> fshcherbanich &lt;[email protected]&gt;<br><b>Last modified date:</b> Sun Sep 10 17:47:00 2023 +0300<br><b>Page content update date:</b> Sun Sep 10 2023<br>Made with <a href='https://github.com/bumble-tech/bumble-doc-gen/blob/master/docs/README.md'>Bumble Documentation Generator</a></div>
Loading

0 comments on commit a112fa8

Please sign in to comment.