npm package: @fingood/components
Description: Fingood shared components
Author: Fingood
Latest version: 0.1.280

<h1 align="center">Fingood Components Ui Kit</h1>

This library containts Ui components for Fingood React apps.

## Available scripts

In the project directory you can run:

### yarn dev

Starts the project for development.

### yarn run build:package

Builds the app for packge publishing into `dist/` folder.

## Commit with commitlint

As this is npm package, we should want to generate changelog with every release. Changelog draws information from commits included in the release, so commit message quality ensures changelog comprehensibility and adds more semantic meaning to our git history.

Use `git add .` and `yarn run commit` to launch the commitlint cli.

You will be prompted to choose commit **type**. It can be one of these:
['feat', 'fix', 'docs', 'style', 'refactor', 'test', 'revert'].
**Type** is required.
The **type feat** must be used when a commit adds a new feature.

You can optionally fill in **scope**.
It is a noun describing a section of the codebase. It is surrounded by parenthesis.
It could be '(ui)', '(lang)', '(parser)', etc.
There can be multiple scopes, which can be separated by ',', '/' or '\'.

You can add **!** after type or scope to draw attention to a breaking change.

Next, **subject** is required. This is a short summary of the code changes.

**body** and **footer** are optional, they enable multi-paragraph commit messages and are used to provide more context to commited changes.

Text in **footer** usually serves to warn about breaking changes - ideally concurrently with **!** mentioned above.
If included as a footer, a breaking change MUST consist of the uppercase text BREAKING CHANGE, followed by a colon, space, and description, e.g., BREAKING CHANGE: environment variables now take precedence over config files.

Example: **fix(ui): Button was not showing up properly on mobile view**
Here the type is fix <==> a fix for a bug, the scope is ui as the fix was related to ui, and the subject provides more context about the issue.

## Ready to publish to NPM?

The repo lives at https://www.npmjs.com/package/@fingood/components. You need to have an npm profile with 2FA enabled and be part of the Fingood organisation to be able to publish new versions there. Ask your FE colleagues to add you there.

<ul>
<li>👉 get your pull request approved, merge it, checkout to master and pull</li>
<li>👉 run `yarn build` and check the output in /dist</li>
<li>👉 run one of the variants of **release** to generate a changelog</li>
<ul>
<li>run `yarn release` if you were a good developer and used commitlint - this way, the app will be able to recognize the gravity of your changes and upgrade the version accordingly automatically. If you misbehaved in your commits, continue and choose by yourself:</li>
<li> you can run `yarn release -- --prerelease` to publish a preprelease version, e.g. 1.0.1-0 </li>
<li> `yarn release -- --release-as-minor` to publish a minor version, e.g. 1.0.2 </li>
<li> `yarn release -- --release-as-major` to publish a major version, e.g. 2.0.0 </li>
<li> or you can be very version-specific just like this `yarn release -- --release-as 3.14.1`</li>
</ul>
<li>👉 run `git push --follow-tags origin master && npm publish`</li>
👉 check npm repo https://www.npmjs.com/package/@fingood/components if the newest version is up (it should be <li>instantaneous) ✨</li>
<li>👉 update dependency in the project where you want to use this lib in</li>
</ul>