Kaudaj / prestashop-maker

Boilerplate code generator for PrestaShop
Academic Free License v3.0
17 stars 4 forks source link
maker-bundle prestashop symfony

PrestaShop Maker

GitHub release GitHub license Minimum PHP Version

PHP tests

PrestaShop Maker is a tool to generate boilerplate code for PrestaShop projects.
It uses Symfony MakerBundle to generate code and then move the changes to your own project.

Guide

Installation

Download a release.

Clone the repository.

git clone https://github.com/Kaudaj/prestashop-maker.git
cd prestashop-maker
composer install

Usage

PrestaShop Maker adds a new command: make-to.

make-to <destination-path> <make-command>

Example:

php /path/to/prestashop-maker/bin/console make-to /path/to/prestashop/project make:ps:grid

Working on a module

If you want to generate the files to a module instead of PrestaShop core, use -m option with the module class name.

You can also define DESTINATION_MODULE environment variable instead (in /.env.local). It's practical if you're actively working on the same module, so you don't have to retype it everytime in the make-to command.

Example:

php /path/to/prestashop-maker/bin/console make-to /path/to/prestashop/project make:ps:grid -m MyModule

Recommended: Create an alias

As you can see, it will be quickly tiring to type the whole prestashop-maker console path each time. It is highly recommended to define a simpler shortcut that you can use anywhere.

Instructions are available in this gist.
Replace <your-command> with php /path/to/prestashop-maker/bin/console make-to and your-alias with whatever you want.

As you can see, calling the make-to command then becomes much easier:

your-alias /path/to/prestashop/project make:ps:grid

Makers

Current makers

To get the list of all the available makers, you can run the following command:

php bin/console list make

To get the list of the makers from PrestaShop Maker only, run this one:

php bin/console list make:prestashop
# or
php bin/console list make:ps

Planned makers

To go further

Reporting issues

You can report issues with this module in this very repository. Click here to report an issue.

Contributing

As it is an open source project, everyone is welcome and even encouraged to contribute with their own improvements!

To contribute in the best way possible, you want to follow the PrestaShop contribution guidelines.

License

This module is released under the Academic Free License 3.0.

Contact

Feel free to contact me by email at info@kaudaj.com.