Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Latest commit

 

History

History
48 lines (36 loc) · 1.47 KB

CONTRIBUTING.md

File metadata and controls

48 lines (36 loc) · 1.47 KB

Contributing to cf-ui

Getting Started

To get started run:

git clone git@github.com:cloudflare/cf-ui.git
cd cf-ui
yarn install
yarn run bootstrap

Because we use Lerna you'll also need to run yarn run bootstrap anytime that you have changed the dependencies within a package.

Commiting changes

cf-ui follows the conventional-commits standard and enforces it with a pre-commit hook that should have been installed on your system when you installed the dependencies from npm.

Make sure to include the full name of the package that you are changing in the scope part of the commit message in order to get the benefit of lerna automatically setting the correct version number for the component as well as generating the correct CHANGELOG.

Development tasks

yarn run build # Build all the packages using Babel (targets: commonjs, ES6)
yarn run build -- cf-component-button # Build one package (targets: commonjs, ES6)
yarn run lint # Run the eslint
yarn run prettier # Reformats the whole JS codebase, look for an on-save integration for your editor
yarn test # Run the tests, you need to run 'yarn run build' first
yarn test -- --testPathPattern cf-component-button # Run the tests on a single package
yarn test -- --watchAll # Run the tests in watch mode

Publishing packages

cf-ui uses Lerna in order to publish new versions of packages.

yarn run publish