Skip to content

Latest commit

 

History

History
78 lines (50 loc) · 1.6 KB

File metadata and controls

78 lines (50 loc) · 1.6 KB

Contributing to @axa-fr/react-toolkit

Prerequisite

You must use a version of Node.js respecting the following rule >=10.14.2 or 12.x or >=14.

Installation

To get started with the repository:

git clone https://github.com/AxaGuilDEv/react-toolkit.git
cd react-toolkit
npm install

A post-install action is thrown. This action first install dependencies with lerna bootstrap & then build all packages with a custom command gulp.

At this point you are ready to contribute.

How to work on a component

Into a terminal, to start to develop a component you can run

npm run dev

Or, if you want to run your component in watch mode, execting one of command below

# If your component is in js
npm run dev:js -- --scope=@axa-fr/react-toolkit-status

# If your component is in TypeScript
npm run dev:ts -- --scope=@axa-fr/react-toolkit-action

scope refer to package name of your component you are working on.

And then if you want to work on it, in isolation mode, you can run storybook

npm run storybook

After all this, if your development affect css, you can run npm run style to regenerate css

Other usefull commands

Run unit tests

npm test

By default, npm test also runs the linter. You can add args to npm test command with --:

$ npm test -- --watch
$ npm test -- --config jest.config.json
# etc

Run coverage

npm test -- --coverage

Pull Request

Please respect the following PULL_REQUEST_TEMPLATE.md

Issue

Please respect the following ISSUE_TEMPLATE.md