There are two main source folders
This component library will be used by most of deskbookers projects. So to ensure sure ensure maximum quality and reliability, make sure to include tests for all components you create and be sure to cover all tests.
Tests are handled by Jest
yarn test (snapshot testing is available to use) and there is code coverage available to use as well through
Previewing changes you made into this project will be done through react-storybook, you can run it by doing:
$ yarn storybook
This will create a new dev server at localhost:9001 with hot-reload enabled.
Make sure you squash your PR before merging into master/develop following the next convention:
Must be one of the following:
The scope could be anything specifying place of the commit change. For example
You can use
* when the change affects more than a single scope.
The subject contains succinct description of the change:
yarn build to transpile the code into the
dist folder. You'll end up with a components.js file and with a styleguide.css file which will contain all the styles of the components + the styleguide.
Please make sure to follow semver when updating the package.json:version field.
Start with: 1.0.0Fix a bug? 1.0.1Add a feature? 1.1.0Backwards incompatible? 2.0.0
Make changesCommit those changesMake sure your tests are passingBump version in package.json`yarn changelog`Commit package.json and CHANGELOG.md filesTagPush
The reason why you should commit and tag after
yarn changelog is that the CHANGELOG should be included in the new release, hence gitRawCommitsOpts.from defaults to the latest semver tag.