Release
If your theme is ready for production use, you can use the following methods to create your theme zip file.
GitHub workflow
TailPress comes with a GitHub action workflow located in .github/workflows/release.yml
. This will make sure your composer dependencies are installed and optimized, your assets are compiled and a ZIP-file of your theme is created as a release asset.
This workflow is triggered when you create a new release of your theme at GitHub.
Using TailPress CLI
TailPress ships with a release
script which allows you to create a zip file of your theme. The script will mirror your theme folder, make sure the composer dependencies are optimized and assets are compiled. It will also remove files and folders listed in .distignore
.
To use it, run:
1./vendor/bin/tailpress-cli release <destination-path> <zipfile-name>
Manually
If you want to make your theme ready for production manually, please take in consideration that:
- You should run composer install with the
--no-dev
and--optimize-autoloader
flags, to prevent development packages being included - Run
npm run build
to compile your assets for production use - Check your not including files and folders such as
node_modules
,.github
etc. as they are not needed in production. You can take a look at.distignore
for files you might want to remove
You should not run this on your local development version of the theme, but rather make a copy of it and then finally zip the end result.