@bornlogic/reborn
v12.81.1
Published
reBorn - made by bornlogic front end team
Downloads
1,871
Keywords
Readme
Reborn - Bornlogic's Design System
React components library used by the Reborn project.
Build
To build the project, we use tsup
to bundle the code in CommonJS and ESM
format.
[!NOTE] ESM requires specifying the full path of a folder or file to import them, including file extensions. For example,
import { Component } from './MyComponent.js'
. See https://nodejs.org/api/esm.html#mandatory-file-extensions.
Linter
We lint the codebase with:
- ESLint, to enforce patterns and styles.
- TypeScript, to catch any type errors.
dpdm
, to catch circular dependencies.
Testing
Tests are written with Jest and react-testing-library
.
To run every test in the project:
npm run test
It's recommended to read react-testing-library
's Guiding
Principles to learn that
we should test our components how a user would. We use the
user-event
library to
simulate a user.
[!NOTE] Our tests don't actually run in the browser, they run in Node using
jsdom
-- a software that simulates the browser in Node.js.
Contributing
Installing dependencies
We use npm
to manage dependencies. Install them as usual:
npm install
[!NOTE] Please, avoid committing other types of lockfiles other than
package-lock.json
into the project, so that every developer will install the same dependencies used by the latest build.
Storybook
To contribute, you'll first need to learn how to run components locally with Storybook.
We use MDX to write our stories. Check the official docs to learn more. But here's a brief explanation:
release-please
workflow
To manage releases, we use
release-please
, which
automatically bumps the project version according to the latest commits.
For this reason, it's expected that we follow the conventional commits specification:
If a commit introduces a new feature, prefix the message with feat:
and a new
minor version will be released.
If a commit fixes a bug, use fix:
and a new patch version will be released.
If a commit introduces a breaking change, append a !
to feat
or fix
to
release a new major version.
Then open a PR once you have finished your changes.
When the PR is approved, merge it and a release PR will be created by
release-please
-- just ask for someone with write access to merge it and a
new release will be published in npm, which you can then install in your
project with npm install @bornlogic/reborn@latest
.