WPBP/WordPress-Plugin-Boilerplate-Powered

Add docs about packaging for deploy

Closed this issue · 4 comments

Hi. Thank you for this amazing boilerplate but I have a question. I created a plugin using the generator. I did composer install and now the packages which are installed are in composer folder.

The size of the composer folder is around 300MB though. If I need to pack my plugin into a zip, what is the best way to do that?

Mte90 commented

Hi and thanks :-D
The size is based an all the stuff downloaded by composer and the heavy part is for the unit tests that you don't need to package in the zip.
To package plugin made with this boilerplate I use: https://github.com/CodeAtCode/freemius-suite/blob/master/package.sh
As you can see https://github.com/CodeAtCode/freemius-suite/blob/master/package.sh#L73 here I install only the stuff for the plugin and not for the development.

I think that I have to add some docs for that!

Thank you so much for a quick reply. I will try that.

Just leaving it here in case somebody need it in future: (might also want to add it to the documentation)

On macosx, the -f flag in readlink is not valid. You might want to delete it from the sh or add a check like mentioned here yarnpkg/yarn#2511

For installing composer packages, https://stedolan.github.io/jq/download/ is required so please install according to the platform you are packaging it on.