Skip to content

Commit aea2050

Browse files
committed
feat: add CLI.
1 parent 7346a79 commit aea2050

File tree

9 files changed

+1114
-3
lines changed

9 files changed

+1114
-3
lines changed

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
11
# php-vendor-creadits
22
php-vendor-creadits creates CREDITS file from LICENSE files of dependencies
3+
4+
## Install
5+
6+
### From Composer
7+
8+
```bash
9+
composer require --dev smeghead/php-vendor-credits
10+
```
11+
12+
## Usage
13+
14+
```bash
15+
$ vendor/bin/php-class-diagram . > CREDITS
16+
```

bin/php-vendor-credits

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
declare(strict_types=1);
5+
6+
require __DIR__ . '/../vendor/autoload.php';
7+
8+
use Smeghead\PhpVendorCredits\Command\CreditsCommand;
9+
use Symfony\Component\Console\Application;
10+
11+
$app = new Application('php-vendor-credits', '0.0.1');
12+
$app->add(new CreditsCommand('credits'));
13+
$app->setDefaultCommand('credits', true);
14+
$app->run();

composer.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
"name": "smeghead"
1818
}
1919
],
20-
"require": {},
20+
"require": {
21+
"symfony/console": "^5.4"
22+
},
2123
"scripts": {
2224
"test": [
2325
"php vendor/bin/phpunit --colors test/"

0 commit comments

Comments
 (0)