-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Write command runners instead of "shortcuts"
Eliminating the need for vendor/bin/parable and thus Parable\Framework\* In preparation of upgrading from parable to parable-php Refs #5
- Loading branch information
1 parent
740ad97
commit fddf3a5
Showing
6 changed files
with
69 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,15 @@ | ||
#!/usr/bin/env bash | ||
vendor/bin/parable convert $* | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
use Csv2Qif\Command\Convert; | ||
use Parable\Console\App; | ||
use Parable\DI\Container; | ||
|
||
require_once __DIR__ . '/vendor/autoload.php'; | ||
|
||
$cmd = Container::get(Convert::class); | ||
|
||
Container::get(App::class) | ||
->setDefaultCommand($cmd) | ||
->setOnlyUseDefaultCommand(true) | ||
->run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
#!/usr/bin/env bash | ||
cd "`dirname "$0"`" | ||
vendor/bin/parable ui | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
use Csv2Qif\Command\Ui; | ||
use Parable\Console\App; | ||
use Parable\DI\Container; | ||
|
||
require_once __DIR__ . '/vendor/autoload.php'; | ||
|
||
$cmd = Container::get(Ui::class); | ||
|
||
Container::get(App::class) | ||
->setDefaultCommand($cmd) | ||
->setOnlyUseDefaultCommand(true) | ||
->run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
use Csv2Qif\Command\Convert; | ||
use Csv2Qif\Command\Ui; | ||
use Csv2Qif\Command\Validate; | ||
use Parable\Console\App; | ||
use Parable\Console\Command\Help; | ||
use Parable\DI\Container; | ||
|
||
require_once __DIR__ . '/vendor/autoload.php'; | ||
|
||
$cmd = Container::get(Help::class); | ||
|
||
Container::get(App::class) | ||
->setDefaultCommand($cmd) | ||
->setOnlyUseDefaultCommand(true) | ||
->addCommands([ | ||
Container::get(Convert::class), | ||
Container::get(Ui::class), | ||
Container::get(Validate::class), | ||
]) | ||
->run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,15 @@ | ||
#!/usr/bin/env bash | ||
vendor/bin/parable validate $* | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
use Csv2Qif\Command\Validate; | ||
use Parable\Console\App; | ||
use Parable\DI\Container; | ||
|
||
require_once __DIR__ . '/vendor/autoload.php'; | ||
|
||
$cmd = Container::get(Validate::class); | ||
|
||
Container::get(App::class) | ||
->setDefaultCommand($cmd) | ||
->setOnlyUseDefaultCommand(true) | ||
->run(); |