This theme utilizes Laravel Mix for most of the build process with the theme.
Laravel Mix is a layer built on top of Webpack that makes defining your build process much easier than attempting to write out a custom
webpack.config.js configuration file. It simplifies most of the complexity while still allowing you to define custom Webpack config options for more advanced uses.
You may configure the build process to your liking by editing
The following is a list of commands you can run from the command line:
Preparing your theme for release
Whether you're going to upload to a site via FTP or create a ZIP to for users to download, you'll want to have all the files you need neatly packaged for production. Mythic has the tools for this, but you'll want to follow a specific order to get everything right.
Before beginning, make sure to navigate to your theme folder via the command line to make sure you're in the right place.
Step 1: Switch Composer to production
You need to switch your Composer files to production, rather than development. This will remove files that you don't need in a production environment.
composer update --prefer-dist --no-dev
Step 2: Build theme
The build process is a combination of commands run in the following order:
prod- Creates the production-ready assets for your theme.
i18n- Adds textdomains and creates a POT file.
export- Creates a
/<theme-slug>folder in your theme for distribution.
You can run those manually or simply run:
npm run build
From this point, you can create a ZIP folder with the zipping utility on your computer or simply upload the files to a site.
Step 3: Switch Composer back to dev
Note that you changed your Composer environment to production in Step 1. You'll likely want to switch it back to development at some point. To do so, you simply run the following command: