Contribution Guide PWA

1: Create issue
Every change to the code and every pull request must be assigned to an issue. The issue ID created is required for the following steps.

2: Forkopen in new window the hubble Repositoryopen in new window with your Github account.

3: Setup NuxtJs

npx create-nuxt-app <PROJECT-NAME>

4: Clone new fork

cd <PROJECT-NAME>
mkdir modules
cd modules
git clone https://github.com/<YOUR-ACCOUNT-NAME>/hubble-frontend-pwa.git

5: Register module to nuxtjs

// ~/package.json
"devDependencies": { 
    "@hubblecommerce/hubble": "file:modules/hubble-frontend-pwa"
}
// ~/nuxt.config.js
modules: [
    ['@hubblecommerce/hubble']
]

6: Install dependencies

npm install

7: Edit configs in .env file

# API
# Define api type:
# possible source parameters are:
# api = hubble Api based on elastic search
# sw = official Shopware 6 API (headless Channel)
API_SW_ACCESS_KEY = ''
API_BASE_URL      = ''

8: Install dependencies and launch app in dev mode

npm install
npm run dev

9: Tracking the original repository as a remote fork
This is especially important to keep the fork up to date to the original repository (upstream).

git remote add --track dev upstream https://github.com/hubblecommerce/hubble-frontend-pwa.git
git fetch upstream

10: Create a new branch for the issue based on the upstream dev branch

git checkout -b issue#<NUM> upstream/dev

11: Push changes to the code to the fork repository (specify issue ID)

git add .
git commit -m "issue#<NUM> my detailed commit message"
git push -u origin issue#<NUM>

12: Pull Request
Go to Pull Requestsopen in new window. You should see an automatic suggestion from Github to make a new pull request from the created branch issue#<NUM>.

WARNING

Specify dev as base branch and NOT main.

Last Updated: