Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

Commit 3834e27

Browse files
committed
♻️ Switched completely to aloe CLI
1 parent 91ff068 commit 3834e27

5 files changed

Lines changed: 20 additions & 2908 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ node_modules
55
build
66
dist
77
compiled
8-
.idea
8+
.idea
9+
*.lock

App/Console/ExampleCommand.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,18 @@ class ExampleCommand extends Command
99
public $description = "example command's description";
1010
public $help = "example command's help";
1111

12+
public function config()
13+
{
14+
// you can add arguments and options in the config method
15+
$this
16+
->setArgument("argument", "required", "argument description")
17+
->setOption("option", "o", "required", "option description");
18+
}
19+
1220
public function handle()
1321
{
14-
$this->comment("example's output");
22+
$this->comment(
23+
"example command's output {$this->argument('argument')} {$this->option('option')}"
24+
);
1525
}
1626
}

aloe

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ require __DIR__ . "/Config/paths.php";
5151
| Initialise aloe cli
5252
|
5353
*/
54-
$console = new \Aloe\Console;
54+
$console = new \Aloe\Console("Leaf API", "v2.0");
5555

5656
/*
5757
|--------------------------------------------------------------------------
58-
| Load Aloe Commands
58+
| Configure Aloe
5959
|--------------------------------------------------------------------------
6060
|
61-
| Load default aloe cli commands
61+
| Set aloe environment to Leaf API
6262
|
6363
*/
64-
$console->load();
64+
\Aloe\Command\Config::$env = "API";
6565

6666
/*
6767
|--------------------------------------------------------------------------

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
}
2020
],
2121
"require": {
22+
"leafs/leaf": "^2.4.0-beta",
23+
"leafs/aloe": "dev-master",
2224
"doctrine/dbal": "^2.9",
2325
"illuminate/console": "^6.3",
24-
"leafs/leaf": "^2.4.0-beta",
2526
"psy/psysh": "^0.9.9",
2627
"symfony/console": "^4.3",
27-
"vlucas/phpdotenv": "^3.6",
28-
"leafs/aloe": "dev-master"
28+
"vlucas/phpdotenv": "^3.6"
2929
},
3030
"require-dev": {
3131
"fzaninotto/faker": "^1.4",

0 commit comments

Comments
 (0)