1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-30 07:18:57 +01:00

Build docs

This commit is contained in:
Daniil Gentili 2022-10-08 14:10:04 +02:00
parent 4477813b60
commit 891f5a19ac
5 changed files with 9 additions and 5 deletions

View File

@ -105,6 +105,7 @@
"build": [
"@docs",
"@phpdoc",
"@docs-fix",
"@cs-fix",
"@psalm"
],
@ -123,6 +124,7 @@
"psalm": "psalm",
"phpdocMain": "php tools/phpdoc.php",
"docs": "php tools/build_docs.php",
"docs-fix": "tools/fix_docs.sh",
"test": "@php -dzend.assertions=1 -dassert.exception=1 ./vendor/bin/phpunit --coverage-text --config tests/phpunit.xml",
"bin": "echo 'bin not installed'",
"post-install-cmd": ["@composer bin all install --ansi"],

2
docs

@ -1 +1 @@
Subproject commit 55cb829ab508e5d041b6baf1be196d9dbd114789
Subproject commit cf7737b8eb889480b8ef37276e7f3a5cc1813f16

View File

@ -199,5 +199,3 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
include 'phpdoc.php';
\passthru('find -name \'*.md\' -exec sed \'s/\\.md/.html/g\' -i {} +');

4
tools/fix_docs.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash -e
find docs/ -name '*.md' -exec sed 's/\.md/\.html/g' -i {} +
sed 's:(danog:(/PHP/danog:g' -i docs/docs/PHP/index.md

View File

@ -68,7 +68,7 @@ foreach (['methods', 'constructors'] as $type) {
$name = $constructor[$key];
if (!$old[$type]->$finder($name)) {
$name = getUrl($name, $type);
$res .= "Added $name\n";
$res .= "- $name\n";
}
}
@ -107,7 +107,7 @@ foreach (['methods', 'constructors'] as $type) {
foreach ($old[$type]->by_id as $constructor) {
$name = $constructor[$key];
if (!$new[$type]->$finder($name)) {
$res .= "Removed $name\n";
$res .= "- $name\n";
}
}
}