Module is a helper to install ScandiPWA Theme.
Version 1.2.0
introduce changes to theme registration logic, related to URL rewrite functionality.
theme.xml
got custom <pwa>true</pwa>
node, that is forcing custom theme type.
In order to simply update already installed theme, update theme
table in the database, setting up type
= 4
for
your PWA theme. Cache flush is necessary once done!
composer require scandipwa/installer
After installation flush the caches (Varnish or filesystem).
scandipwa:theme:bootstrap
must appear in your Magento 2 CLI command list
php bin/magento
Command accepts single parameter, which is treated as following format: "Vendor/theme".
Note
You can change Scandiweb/pwa
in examples below to anything suitable for you, keeping the same naming structure:
Vendor/theme_name
After php bin/magento scandipwa:theme:bootstrap Scandiweb/pwa
it will make next effect:
- Check for
<magento_root>/app/design/frontend/Scandiweb/pwa
- bootstrap will quite with error if directory is present to prevent unwanted overrides. - Create
<magento_root>/app/design/frontend/Scandiweb/pwa
directory - Copy necessary files to the newly created theme root.
- Answer y/N (No is default) to a prompt for
theme.xml
andregistration.php
generation. You might want to create them manually - feel free to do it! - Run
php bin/magento setup:upgrade
. - You are bootstraped!
The theme must be built after it is bootstrap or after any changes.
- Go to
app/design/frontend/Scandiweb/pwa
(or your customVendor/theme_name
) - run
npm ci
- run
npm run build
If you'd like to get the same result as v1.scandipwa.com you must import database dump and get media
In order to customize copying task - simply edit di.xml
, passing array with paths.