开源软件名称(OpenSource Name):Jeroen-G/laravel-packager开源软件地址(OpenSource Url):https://github.com/Jeroen-G/laravel-packager开源编程语言(OpenSource Language):PHP 100.0%开源软件介绍(OpenSource Introduction):Laravel PackagerThis package provides you with a simple tool to set up a new package and it will let you focus on the development of the package instead of the boilerplate. If you like a visual explanation check out this video by Jeffrey Way on Laracasts. InstallationVia Composer $ composer require jeroen-g/laravel-packager --dev If you do not run Laravel 5.5 (or higher), then add the service provider in JeroenG\Packager\PackagerServiceProvider::class, If you do run the package on Laravel 5.5+, package auto-discovery takes care of the magic of adding the service provider.
Be aware that the auto-discovery also means that this package is loaded in your production environment. Therefore you may disable auto-discovery and instead put in your if ($this->app->environment('local')) {
$this->app->register('JeroenG\Packager\PackagerServiceProvider');
} Optional you can publish the configuration to provide a different service provider stub. The default is here. $ php artisan vendor:publish --provider="JeroenG\Packager\PackagerServiceProvider" Available commandsNewCommand: $ php artisan packager:new my-vendor my-package Result: The command will handle practically everything for you. It will create a packages directory, creates the vendor and package directory in it, pulls in a skeleton package, sets up composer.json and creates a service provider. Options: $ php artisan packager:new my-vendor my-package --i
$ php artisan packager:new --i The package will be created interactively, allowing to configure everything in the package's $ php artisan packager:new my-vendor/my-package Alternatively you may also define your vendor and name with a forward slash instead of a space. Remarks: The new package will be based on this custom skeleton. If you want to use a different package skeleton, you can either:
Get & GitCommand: $ php artisan packager:get https://github.com/author/repository
$ php artisan packager:git https://github.com/author/repository Result:
This will register the package in the app's Options: $ php artisan packager:get https://github.com/author/repository --branch=develop
$ php artisan packager:get https://github.com/author/repository my-vendor my-package
$ php artisan packager:git https://github.com/author/repository my-vendor my-package It is possible to specify a branch with the TestsCommand: $ php artisan packager:tests Result:
Packager will go through all maintaining packages (in <testsuite name="Packages">
<directory suffix="Test.php">./tests/packages</directory>
</testsuite> Options: $ php artisan packager:tests my-vendor my-package Remarks: If a tests folder exists, the files will be copied to a dedicated folder in the Laravel App tests folder. This allows you to use all of Laravel's own testing functions without any hassle. ListCommand: $ php artisan packager:list Result:
An overview of all packages in the Options: $ php artisan packager:list --git The packages are displayed with information on the git status (branch, commit difference with origin) if it is a git repository. RemoveCommand: $ php artisan packager:remove my-vendor my-package Result:
The PublishCommand: $ php artisan packager:publish my-vendor my-package https://github.com/my-vendor/my-package Result:
The CheckCommand: $ php artisan packager:check my-vendor my-package Result:
The Remarks You first need to run $ composer require sensiolabs/security-checker Issues with cURL SSL certificateIt turns out that, especially on Windows, there might arise some problems with the downloading of the skeleton, due to a file regarding SSL certificates missing on the OS. This can be solved by opening up your .env file and putting this in it:
Of course this means it will be less secure, but then again you are not supposed to run this package anywhere near a production environment. Issues with timeoutIf you are having problems with timeouts when creating new packages, you can now change the config variable timeout in config/packager.php to fix this. ChangelogPlease see changelog.md for what has changed recently. ContributingPlease see contributing.md for details and a todolist. CreditsLicenseThe EU Public License. Please see license.md for more information. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论