Contributing to ScandiPWA
April 14, 2021 ยท View on GitHub
Loving ScandiPWA and want to get involved? Thanks! There are plenty of ways you can help.
Please take a moment to review this document in order to make the contribution process straightforward and effective for everyone involved.
Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features.
Submitting a Pull Request
Good pull requests, such as patches, improvements, and new features, are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.
Please ask first if somebody else is already working on this or the core developers think your feature is in-scope for Create ScandiPWA App. Generally always have a related issue with discussions for whatever you are including.
Please also provide a test plan, i.e. specify how you verified that your addition works.
Folder Structure
โโโ ๐ packages
โโโ ๐ scandipwa
โโโ ๐ m2-theme
โโโ ๐ bundle-analyzer
โโโ ๐ router
โโโ ๐ framework
Setting up a local copy
- Clone the repo with
git clone https://github.com/scandipwa/scandipwa - Run
yarnin the rootscandipwafolder. - Go to
packages/scandipwa - Type in
yarn start
Now you can modify files and see changes!
Sym-linking with legacy docker-setup
- In your docker-project root directory, run
mkdir src/localmodules - Clone the repo into that folder with
git clone https://github.com/scandipwa/scandipwa src/localmodules/scandipwa - Enter the
scandipwafolder withcd src/localmodules/scandipwa - Install dependencies by running
yarn(make sure you are on a correct branch,create-scandipwa-appas of 8th December 2020) - Now enter the
scandipwapackage directory withcd packages/scandipwa - Start the development using the
BUILD_MODE=magento yarn start - Now keep that process running and open another terminal tab / window / session
- Run your Docker application using the
dc up -d(notdcfordcc). - Enter the application container using the
inapp bash - Remove installed ScandiPWA packages:
composer remove scandipwa/installer - Now add local composer repository:
composer config repo.theme path localmodules/scandipwa/packages/scandipwa/ - Require the new ScandiPWA theme:
composer require scandipwa/scandipwa - Run setup upgrade:
magento se:up - Disable full-page cache:
magento cache:disable full_page - Go to Magento 2 admin, visit
Content > Design > Configuration, select last row, click last columnEditbutton. Selectscandipwa/scandipwa. - Run
magento cache:flush
Publishing
Use lerna publish command.
For canary publishing, use lerna publish --canary --exact --preid next --dist-tag=next minor