Skip to content

Latest commit

 

History

History
92 lines (63 loc) · 1.65 KB

File metadata and controls

92 lines (63 loc) · 1.65 KB

Contributing to @axa-fr/react-toolkit

First, ensure you have the latest npm.

To get started with the repository:

git clone https://github.com/AxaGuilDEv/af-toolkit.git
cd af-toolkit
npm install
npm run bootstrap

Commands

How to run

Demo of how the component is used.

# [react] Develop with storybook
$ npm run storybook
# [react] Build the storybook website
$ npm run storybook:build

# [react] To edit component in live inside storybook, you have run js compilation in another bash process
$ npm run dev

# [css] Develop html/css
$ npm run css
# [css] Build the html/css website
$ npm run css:build

Run Unit Tests

$ npm test

# watch for changes
$ npm test -- --watch

# For a specific file (e.g., in packages/context/__tests__/command.test.js)
$ npm test -- --watch packages/action

By default, npm test also runs the linter. You can skip this by calling jest directly:

$ npx jest
$ npx jest --watch
$ npx jest --config jest.config.json
# etc

Linting

$ npm run lint

It's also a good idea to hook up your editor to an eslint plugin.

To fix lint errors from the command line:

$ npm run lint -- --fix

Coverage

If you would like to check test coverage, run the coverage script, then open coverage/lcov-report/index.html in your favorite browser.

$ npm test -- --coverage

# OS X
$ open coverage/lcov-report/index.html

# Linux
$ xdg-open coverage/lcov-report/index.html

Pull Request

Please respect the following PULL_REQUEST_TEMPLATE.md

Issue

Please respect the following ISSUE_TEMPLATE.md