@redhat-cloud-services/frontend-components

Common components for RedHat Cloud Services project.


License
Apache-2.0
Install
npm install @redhat-cloud-services/frontend-components@2.0.0-beta7

Documentation

Build Status codecov

frontend-components

Monorepo of Red Hat Cloud services Components for applications in a React.js environment.

Packages

Local tasks

Since this is monorepo repository it has some special requirements how to run tasks. This repository is using lerna, so if you have newer version of npm you can run npx lerna $TASK where $TASK is one of lerna commands.

These tasks are preconfigured

  • npm start - will perform start in all packages, you can change the scope by calling npm start -- --scope=pckg_name to run start in pckg_name
  • npm run build - will perform build in all packages, you can change the scope by calling npm start -- --scope=pckg_name to run start in pckg_name
  • npm run clean - to remove all node modules in root and in packages folder
  • npm run bootstrap - to install packages correctly (will link local dependencies as well)
  • npm run test - to run tests locally
  • npm run watch - similiar to start, but will emit files to disk (good for local links)
  • npm run playground - to launch local demo on port 8080

Running locally

Install all packages by calling npm install in root folder. This will perform bootstrap and initial build as well. After that you can choose either playground for testing things seperately, or npm run build to build all packages.

Creating new package

If none package suits scope of new changes, we need to create new package by creating folder inside packages and running npm init in it.

Commit format

Semantic release is used in this project, so to trigger new release you should add specific format into your commit messages and new release will be triggered when PR is merged.

Used formatter

Commit analyzer wildcard is used for parsing commit messages so to trigger new release add one of these strings into your commit and new release is triggered

  • Major - <x.x.x> or <x.x.?> or <x.?.x> or <x.?.?>
  • Minor - <?.x.x> or <?.x.?>
  • Bug - <?.?.x>
  • No release - <no>