|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace Hyde\Console; |
|
6
|
|
|
|
|
7
|
|
|
use Illuminate\Console\Application as Artisan; |
|
8
|
|
|
use Illuminate\Support\ServiceProvider; |
|
9
|
|
|
|
|
10
|
|
|
/** |
|
11
|
|
|
* Register the HydeCLI console commands. |
|
12
|
|
|
*/ |
|
13
|
|
|
class ConsoleServiceProvider extends ServiceProvider |
|
14
|
|
|
{ |
|
15
|
|
|
public function register(): void |
|
16
|
|
|
{ |
|
17
|
|
|
$this->commands([ |
|
18
|
|
|
Commands\BuildRssFeedCommand::class, |
|
19
|
|
|
Commands\BuildSearchCommand::class, |
|
20
|
|
|
Commands\BuildSiteCommand::class, |
|
21
|
|
|
Commands\BuildSitemapCommand::class, |
|
22
|
|
|
Commands\RebuildStaticPageCommand::class, |
|
23
|
|
|
|
|
24
|
|
|
Commands\MakePageCommand::class, |
|
25
|
|
|
Commands\MakePostCommand::class, |
|
26
|
|
|
|
|
27
|
|
|
Commands\VendorPublishCommand::class, |
|
28
|
|
|
Commands\PublishConfigsCommand::class, |
|
29
|
|
|
Commands\PublishHomepageCommand::class, |
|
30
|
|
|
Commands\PublishViewsCommand::class, |
|
31
|
|
|
Commands\PackageDiscoverCommand::class, |
|
32
|
|
|
|
|
33
|
|
|
Commands\RouteListCommand::class, |
|
34
|
|
|
Commands\ValidateCommand::class, |
|
35
|
|
|
Commands\ServeCommand::class, |
|
36
|
|
|
Commands\DebugCommand::class, |
|
37
|
|
|
|
|
38
|
|
|
Commands\ChangeSourceDirectoryCommand::class, |
|
39
|
|
|
]); |
|
40
|
|
|
|
|
41
|
|
|
Artisan::starting(function (Artisan $artisan): void { |
|
42
|
|
|
$artisan->setName(self::logo()); |
|
43
|
|
|
}); |
|
44
|
|
|
} |
|
45
|
|
|
|
|
46
|
|
|
protected static function logo(): string |
|
47
|
|
|
{ |
|
48
|
|
|
return <<<ASCII |
|
49
|
|
|
|
|
50
|
|
|
\033[34m __ __ __ \033[33m ___ __ _____ |
|
51
|
|
|
\033[34m / // /_ _____/ /__ \033[33m/ _ \/ // / _ \ |
|
52
|
|
|
\033[34m / _ / // / _ / -_)\033[33m ___/ _ / ___/ |
|
53
|
|
|
\033[34m /_//_/\_, /\_,_/\__/\033[33m_/ /_//_/_/ |
|
54
|
|
|
\033[34m /___/ |
|
55
|
|
|
|
|
56
|
|
|
\033[0m |
|
57
|
|
|
ASCII; |
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
|
|
public function boot(): void |
|
61
|
|
|
{ |
|
62
|
|
|
// |
|
63
|
|
|
} |
|
64
|
|
|
} |
|
65
|
|
|
|