Overview:
Molekule is a React component library that aims to be the last one you’ll ever need. It offers a range of features and tools to make component development and integration easier.
Features:
- Automatic release: Molekule automatically builds and publishes releases as soon as branches are merged into the main branch.
- Conventional commits: To support automated semantic versioning, Molekule requires the use of conventional commits, such as “fix” for patch version bumps, “feat” for minor version bumps, and “BREAKING CHANGE” for major version bumps.
- Previewing: Molekule provides a way to preview changes made to components in consuming applications using Yalc. This allows for easier testing and integration before publishing changes.
- Chromatic integration: Molekule integrates with Chromatic, a tool that visually diffs components and detects new changes. This helps ensure that changes are thoroughly reviewed and approved.
Installation:
To install Molekule, follow these steps:
- Install Yalc globally by running
yarn global add yalc. - Run
yarn previewto publish the changes to your local~/.yalcdirectory. - In the consuming application, run either
yarn link molekuleoryalc add molekule. Both options will replace the consuming application’s node module with the yalc version of Molekule. - Start or restart the consuming application to preview the changes locally.
- Once you’re satisfied with the changes, remove the yalc version of Molekule in the consuming application by running
yalc remove molekule, and restore the package by runningyarn install --check-files.
Summary:
Molekule is a powerful React component library that offers automated release management, support for conventional commits, and tools for previewing changes and visually diffing components. Its integration with Chromatic allows for thorough testing and approval processes. With Molekule, developers can streamline their component development and integration workflows.