Development
Technology
- ReactJS
- Apollo & GraphQL
- Merchant Center Application Kit
- UI Kit - Merchant Center component library
- Yarn - Package manager
- Jest - Test runner
- Prettier - Code formatter
- ESLint - JS, CSS, and GraphQL linter
Installation
Clone the repository.
Simply run yarn
or yarn install
from the repository root to install the application’s dependencies.
yarn
If this is the first time running the application locally, create an env.json
file at the root directory using env.template
as an example. Based on your region, you may find it necessary to modify the values of frontendHost
, mcApiUrl
, and location
.
Run the following command to start the development server and launch the application:
yarn start
Build
Run the following command to build the production bundles with webpack:
yarn build
Linting & Formatting
Formatting code
Run the following command to format JS, CSS, JSON and GraphQL files
yarn format
Linting code
Run the following command to lint JS, CSS, and GraphQL files
yarn lint
Tests
Run the following command to run the tests:
yarn test
To run the tests in watch mode:
yarn test:watch
To run the tests with coverage:
yarn test:coverage