-
Notifications
You must be signed in to change notification settings - Fork 77
Developer Guide
-
Fork the repository
-
Clone the forked repository to your local machine
git clone https://github.com/{your_username}/fundamental-react.git
-
Navigate to the directory
cd fundamental-react
-
Install dependencies
npm install
-
To run storybook:
npm start
See Testing wiki page for more details on adding to these tests.
-
Unit tests
npm run test
Note: If your changes have affected any snapshots, run
npm run test -- -u
-
coverage
npm run test:coverage
-
visual regression testing and jest snapshot testing (based off storybook stories)
npm run test:storybook
Note: If your changes have affected visual regression images or if you have added new stories, run
npm run test:storybook:update
Linting is achieved using ESLint and StyleLint.
npm run lint
This command can be run manually at any time and will be run as part of a pre-commit hook.
Documentation is created using @storybook/addon-docs
.
See Documentation wiki page for more details on adding to the documentation.
When authoring a change, create a pull request with the title beginning with one of the prefixes listed below:
-
feat:
new features in the distribution package code- will increment the PATCH version number (
[MAJOR].[MINOR].[PATCH]
) - will show up in the Features section in the release notes
- will increment the PATCH version number (
-
fix:
bug fixes in the distribution package code- will increment the PATCH version number (
[MAJOR].[MINOR].[PATCH]
) - will show up in the Bug Fixes section in the release notes
- will increment the PATCH version number (
-
docs:
any changes to the documentation pages/content (fixes or features)- will increment the PATCH version number (
[MAJOR].[MINOR].[PATCH]
) - will show up in the Documentation section in the release notes
- will increment the PATCH version number (
-
chore:
infrastructure/internal changes that don’t affect the distribution package code or the documentation pages/content- will increment the PATCH version number (
[MAJOR].[MINOR].[PATCH]
) - will NOT show up in the release notes
- will increment the PATCH version number (
BREAKING CHANGE:
any change that meets the breaking criteria outlined in the README
- will increment the MINOR version number (
[MAJOR].[MINOR].[PATCH]
) - will show up in the Breaking Changes section in the release notes
Use one of the standard pr titles, but in the description include:
BREAKING CHANGE: whatever the breaking change is
When merging a pull request, make sure the title of the merge commit starts with one of those prefixes. This is used by standard-version
to increment the package version and update the CHANGELOG.md
file and is also used to generate release notes when publishing releases.