Conveniently build, package, and create a .zip for your WordPress plugin.
composer require bszyk/zip-wp --dev
update your project's composer.json
:
"scripts": {
"zip-wp": [
"ZipWP\\ZipWP::run_script"
]
}
To use, run composer zip-wp
in the project's root folder.
Composer package that runs a bash
script that:
- Gets the plugin slug from the home directory folder name.
- Prompts user for the version number.
- Creates and/or updates
changelog.txt
.- User may enter multiple lines.
- To exit, use
CTRL D
when on a newline.
- Runs
npm run build
. - Gathers all
.php
files, all content ofbuild
andassets
folders, and other common files. - Compresses items into
./_releases/VERSION/PLUGIN-SLUG.zip
.
You will need to give the .sh
permission via chmod 775
et. al.