2017 © Pedro Peláez
 

library laravel-package-generator

A laravel package generator

image

melihovv/laravel-package-generator

A laravel package generator

  • Friday, July 13, 2018
  • by melihovv
  • Repository
  • 2 Watchers
  • 29 Stars
  • 1,557 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 9 Forks
  • 1 Open issues
  • 22 Versions
  • 5 % Grown

The README.md

Laravel package generator

GitHub Workflow Status styleci, (*1)

Packagist Packagist Packagist, (*2)

Simple package to quickly generate basic structure for other laravel packages., (*3)

Install

Install via composer, (*4)

composer require --dev melihovv/laravel-package-generator

Publish package config if you want customize default values, (*5)

php artisan vendor:publish --provider="Melihovv\LaravelPackageGenerator\ServiceProvider" --tag="config"

Available commands

php artisan package:new -i {vendor} {package}

Create new package., (*6)

Example: php artisan package:new Melihovv SomeAwesomePackage, (*7)

This command will:, (*8)

  • Create packages/melihovv/some-awesome-package folder
  • Register package in app composer.json
  • Copy package skeleton from skeleton folder to created folder (you can provide your custom skeleton path in config)
  • Run git init packages/melihovv/some-awesome-package
  • Run composer update melihovv/some-awesome-package
  • Run composer dump-autoload

With interactive -i flag you will be prompted for every needed value from you., (*9)

php artisan package:remove {vendor} {package}

Remove the existing package., (*10)

Example: php artisan package:remove Melihovv SomeAwesomePackage, (*11)

This command will:, (*12)

  • Run composer remove melihovv/some-awesome-package
  • Remove packages/melihovv/some-awesome-package folder
  • Unregister package in app composer.json
  • Run composer dump-autoload

Interactive mode also possible., (*13)

Custom skeleton

This package will copy all folders and files from specified skeleton path to package folder. You can use templates in your skeleton. All files with tpl extension will be provided with some variables available to use in them. tpl extension will be stripped., (*14)

Available variables to use in templates:, (*15)

  • vendor (e.g. Melihovv)
  • package (e.g. SomeAwesomePackage)
  • vendorFolderName (e.g. melihovv)
  • packageFolderName (e.g. some-awesome-package)
  • packageHumanName (e.g. Some awesome package)
  • composerName (e.g. melihovv/some-awesome-package)
  • composerDesc (e.g. A some awesome package)
  • composerKeywords (e.g. some,awesome,package)
  • licence (e.g. MIT)
  • phpVersion (e.g. >=7.0)
  • aliasName (e.g. some-awesome-package)
  • configFileName (e.g. some-awesome-package)
  • year (e.g. 2017)
  • name (e.g. Alexander Melihov)
  • email (e.g. amelihovv@ya.ru)
  • githubPackageUrl (e.g. https://github.com/melihov/some-awesome-package)

Things you need to do manually:

  • In README.md:
    • StyleCI repository identifier
    • Package description
    • Usage section

Security

If you discover any security related issues, please email amelihovv@ya.ru instead of using the issue tracker., (*16)

Credits

The Versions

03/07 2017

0.0.2

0.0.2.0

A laravel package generator

  Sources   Download

MIT

The Requires

 

by Alexander Melihov

laravel generator package

03/07 2017

0.0.1

0.0.1.0

A laravel package generator

  Sources   Download

MIT

The Requires

 

by Alexander Melihov

laravel generator package