forked from Flute-CMS/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flute
51 lines (40 loc) · 1.67 KB
/
flute
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env php
<?php
use Flute\Core\Console\Command\CacheClearCommand;
use Flute\Core\Console\Command\GenerateMigrationCommand;
use Flute\Core\Console\Command\GenerateModuleCommand;
require __DIR__ . '/vendor/autoload.php';
define('BASE_PATH', __DIR__);
use Flute\Core\Console\Command\TemplateCacheClearCommand;
use Flute\Core\App;
use Flute\Core\Console\Command\LogsClearCommand;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
use Symfony\Component\Console\Output\ConsoleOutput;
$application = new Application();
// Set the application name and version
$application->setName('Flute Console Application');
$application->setVersion(App::VERSION);
// ASCII logo
$logo = <<<LOGO
________ ___ ___ ___ _________ _______
|\ _____\|\ \ |\ \|\ \ |\___ ___\ |\ ___ \
\ \ \__/ \ \ \ \ \ \\\ \ \|___ \ \_| \ \ __/|
\ \ __\ \ \ \ \ \ \\\ \ \ \ \ \ \ \_|/__
\ \ \_| \ \ \____ \ \ \\\ \ \ \ \ \ \ \_|\ \
\ \__\ \ \_______\ \ \_______\ \ \__\ \ \_______\
\|__| \|_______| \|_______| \|__| \|_______|
LOGO;
// Custom style for the logo
$style = new OutputFormatterStyle('cyan', 'black', ['bold']);
// Create a new ConsoleOutput instance
$output = new ConsoleOutput();
// Print the logo
// $output->writeln($logo);
// ... register commands
$application->add(new TemplateCacheClearCommand());
$application->add(new LogsClearCommand());
$application->add(new CacheClearCommand());
$application->add(new GenerateMigrationCommand());
$application->add(new GenerateModuleCommand());
$application->run();