Skip to content

Commit

Permalink
Add readme for Cycle Bridge, DataGrid bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
msmakouz committed Aug 22, 2023
1 parent 2106ec0 commit 3e50a4b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 11 deletions.
24 changes: 17 additions & 7 deletions installer/Module/CycleBridge/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
use Installer\Application\ComposerPackages;
use Installer\Internal\Generator\GeneratorInterface;
use Installer\Internal\Package as BasePackage;
use Installer\Internal\Readme\Block\ListBlock;
use Installer\Internal\Readme\Section;
use Installer\Module\CycleBridge\Generator\Bootloaders;
use Installer\Module\CycleBridge\Generator\Config;
use Installer\Module\CycleBridge\Generator\Env;
Expand All @@ -30,13 +32,21 @@ public function __construct(
new Env(),
new Skeleton(),
],
array $instructions = [
'Database configuration file: <comment>app/config/database.php</comment>',
'Migrations configuration file: <comment>app/config/migration.php</comment>',
'Cycle ORM configuration file: <comment>app/config/cycle.php</comment>',
'Documentation: <comment>https://spiral.dev/docs/basics-orm</comment>',
],
) {
parent::__construct(ComposerPackages::CycleBridge, $resources, $generators, $instructions);
parent::__construct(ComposerPackages::CycleBridge, $resources, $generators);
}

public function getReadme(): array
{
return [
Section::Configuration->value => [
new ListBlock([
'Database configuration file: `app/config/database.php`',
'Migrations configuration file: `app/config/migration.php`',
'Cycle ORM configuration file: `app/config/cycle.php`',
'Documentation: `https://spiral.dev/docs/basics-orm`'
], $this->getTitle())
],
];
}
}
18 changes: 14 additions & 4 deletions installer/Module/DataGridBridge/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
use Installer\Application\ComposerPackages;
use Installer\Internal\Generator\GeneratorInterface;
use Installer\Internal\Package as BasePackage;
use Installer\Internal\Readme\Block\ListBlock;
use Installer\Internal\Readme\Section;
use Installer\Module\DataGridBridge\Generator\Bootloaders;
use Installer\Module\DataGridBridge\Generator\Interceptors;

Expand All @@ -21,10 +23,18 @@ public function __construct(
new Bootloaders(),
new Interceptors(),
],
array $instructions = [
'Documentation: <comment>https://spiral.dev/docs/component-data-grid</comment>',
],
) {
parent::__construct(ComposerPackages::DataGridBridge, $resources, $generators, $instructions);
parent::__construct(ComposerPackages::DataGridBridge, $resources, $generators);
}

public function getReadme(): array
{
return [
Section::Configuration->value => [
new ListBlock([
'Documentation: `https://spiral.dev/docs/component-data-grid`',
], $this->getTitle())
],
];
}
}

0 comments on commit 3e50a4b

Please sign in to comment.