CLI
Here is a list of available commands:
build
Process all the source files from different locations to output the result into the pub/static
folder.
This aims to be as close as possible from the original behavior.
magefront build -t Magento/blank
The argument provided is the locale
to build:
magefront build en_US
You can load the configuration from the magefront.config.js
file:
magefront build -c
Or from a custom file:
magefront build -c my-config.js
If no theme
is provided, all the themes will be generated:
magefront build
Also, build is the default command, so you can just run:
magefront
watch
Enables a watcher on the source directories of the given theme. When a change is detected, build the theme.
magefront build -t Magento/blank --watch
Only one theme can be used in watch mode.
dev
Run a BrowserSync instance bound to the watcher.
On change, refreshes the *.css
files or the whole page.
magefront dev -t Magento/blank --url https://magento.ddev.site
Only one theme can be used in dev mode.
You might want to set the config web/secure/use_in_frontend
to 0
in your app/etc/env.php
file to avoid mixed content errors.
list
List all the available themes in your Magento 2 project files.
magefront list