/laravel-packager

A cli tool for creating Laravel 5.1 packages

Primary LanguagePHPOtherNOASSERTION

Laravel Packager

Latest Version License

This package provides you with a simple tool to set up a new package. Nothing more, nothing less.

Installation

Via Composer

$ composer require jeroen-g/laravel-packager

Then add the service provider in config/app.php:

'JeroenG\Packager\PackagerServiceProvider',

Usage

New package

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, creates a service provider, registers the package in config/app.php and the app's composer.json. So you can start right away with only this command:

$ artisan packager:new MyVendor MyPackage

The new package will be based on league/skeleton, plus a Laravel service provider.

Existing package

If you already have your package on Github, it is possible to download that:

$ artisan packager:get https://github.com/author/repository

This will too register the package in config/app.php and the app's composer.json file. It is possible to specify a branch with the --branch option. If you specify a vendor and name directly after the url, those will be used instead of the pieces of the url. For example:

$ artisan packager:get https://github.com/author/repository Author PackageRepository

Issues with cURL SSL certificate

It 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:

CURL_VERIFY=false

Contributing

Please see contributing.md for details.

License

The EU Public License. Please see license.md for more information.

Changelog

Please see changelog.md for the changes made.