Git Product home page Git Product logo

laravel-packager's Introduction

Laravel Packager

Latest Version on Packagist Total Downloads Software License

This 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.

Installation

Via Composer

$ composer require jeroen-g/laravel-packager

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

JeroenG\Packager\PackagerServiceProvider::class,

Available commands

New

Command:

$ php artisan packager:new MyVendor MyPackage

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, creates a service provider, registers the package in config/app.php and the app's composer.json.

Options:

$ php artisan packager:new MyVendor MyPackage --i
$ php artisan packager:new --i

The package will be created interactively, allowing to configure everything in the package's composer.json, such as the license and package description.

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

Get & Git

Command:

$ 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 config/app.php and in the app's composer.json file. If the packager:git command is used, the entire Git repository is cloned. If packager:get is used, the package will be downloaded, without a repository.

Options:

$ php artisan packager:get https://github.com/author/repository --branch=develop
$ php artisan packager:get https://github.com/author/repository MyVendor MyPackage
$ php artisan packager:git https://github.com/author/repository MyVendor MyPackage

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.

Tests

Command:

$ php artisan packager:tests

Result: Packager will go through all maintaining packages (in packages/) and publish their tests to tests/packages.

Options:

$ php artisan packager:tests MyVendor MyPackage

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.

List

Command:

$ php artisan packager:list

Result: An overview of all packages in the /packages directory.

Remove

Command:

$ php artisan packager:remove MyVendor MyPackage

Result: The MyVendor\MyPackage package is deleted, including its references in composer.json and config/app.php.

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

Changelog

Please see changelog.md for what has changed recently.

Contributing

Please see contributing.md for details.

Credits

License

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

laravel-packager's People

Contributors

jeroen-g avatar ericcch avatar remo avatar shawnsandy avatar

Watchers

Zsolt Takács avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.