Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
relliv committed Jan 27, 2024
2 parents 2b3bc63 + 53ffc6b commit 3a02af1
Show file tree
Hide file tree
Showing 49 changed files with 3,684 additions and 3,171 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ _ide_helper_models.php
.php_cs.cache
.php-cs-fixer.cache
/.vscode
/coverage
/coverage
/cache
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ Install globally

## 📝 Usage

1. Create a Github or Gitlab repository for your package
2. Pull the package to your local machine
3. Run `packager new` command
4. Enter required information
5. Install the package with `composer install` command
6. Start developing your package

### Create a package

`packager new` or `packager n`
Expand Down
33 changes: 7 additions & 26 deletions bin/packager
Original file line number Diff line number Diff line change
@@ -1,34 +1,15 @@
#!/usr/bin/env php
<?php

if (php_sapi_name() !== 'cli') {
exit;
}

require __DIR__ . '/../vendor/autoload.php';

use Minicli\App;
use Minicli\Exception\CommandNotFoundException;

$app = new App([
'app_path' => __DIR__ . '/../src/Command',
'theme' => '',
'debug' => true,
]);
use Symfony\Component\Console\Application;
use LaravelReady\Packager\Commands\NewPackageCommand;

try {
$app->runCommand($argv);
} catch (CommandNotFoundException $notFoundException) {
$app->getPrinter()->error("Command Not Found.");
$application = new Application();

return 1;
} catch (Exception $exception) {
if ($app->config->debug) {
$app->getPrinter()->error("An error occurred:");
$app->getPrinter()->error($exception->getMessage());
}

return 1;
}
$application->addCommands([
new NewPackageCommand(),
]);

return 0;
$application->run();
13 changes: 7 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@
}
},
"require": {
"php": "^8.0 || ^8.1",
"minicli/minicli": "^3.2.0",
"minicli/command-help": "^0.1.0",
"illuminate/support": "^8.8 || ^v9.0",
"php": "^8.1",
"illuminate/support": "^v9.9.0",
"illuminate/filesystem": "^8.8 || ^v9.0",
"nikic/php-parser": "^v4.14.0",
"nesbot/carbon": "^2.59.1"
"nesbot/carbon": "^2.59.1",
"symfony/console": "^6.2",
"nunomaduro/termwind": "^1.14",
"illuminate/view": "9.0"
},
"scripts": {
"test": "DB_DATABASE=:memory: vendor/bin/pest --colors=always --parallel",
Expand Down Expand Up @@ -59,5 +60,5 @@
"phpunit/phpunit": "^9.5.20",
"friendsofphp/php-cs-fixer": "^3.10"
},
"minimum-stability": "dev"
"minimum-stability": "stable"
}
Loading

0 comments on commit 3a02af1

Please sign in to comment.