Igloo branding

Getting Started

First Component

If you are on Windows, you need to add a new flag in Git. Do this before cloning the project using the following command:

git config core.protectNTFS false

Work Flow

Before starting, make sure you have node and yarn installed.

After cloning ov-igloo-ui, run the command yarn to retrieve the project dependencies. Next, you can run the following commands:

  • yarn dev: builds the components and launches Storybook
  • yarn storybook: launches Storybook
  • yarn test: launches the tests. Alternatively, you can run the tests in watch mode with yarn test --watch
  • yarn lint: validates that the JS and TS correspond to the project's standards.
  • yarn lint:style: validates that the style corresponds to the project's standards.

Component Creation

Run the command yarn bootstrap and follow the instructions.

Ensure that the component name begins with @igloo-ui/.

Style

Class Names

Prefix all the class names with ids-. This prefix prevents potential conflicts with user class names.

Follow the BEM naming convention for classes.

.ids-block {}
.ids-block__element {}
.ids-block--modifier {}

Semantic Versioning

We release patch releases for bug fixes, minor releases for new features and major releases for major updates that require changes in library usage.

Commit Message Format

Each commit message consists of a title and a body. The title has a specific format that includes a type, scope and subject:

Type

Must be one of the following:

  • build: Changes that affect the build system or external dependencies
  • chore: Changes that don't affect the logic of the code (formatting, white spaces, missing semicolon, etc.)
  • ci: Modifications targeting configuration files or CI scripts
  • docs: Modifications to the documentation
  • feat: For a new component or a new feature
  • fix: Bug fix
  • refactor: Changes to the code base that do not fix a bug or add a feature
  • test: Add missing tests or fix existing ones

Project Structure

Lerna

"Lerna is a tool that optimizes the workflow around managing multi-package repositories with git and npm."

Documentation: GitHub - Lerna

Yarn Workspace

It aims to make working with single repositories easier by allowing multiple projects to live together and share dependencies.

Tests

Unit tests are performed with Jest. We essentially test the proper functioning of the component.

Storybook

It allows the creation of components and pages in isolation. It provides us with an environment for development, testing and documentation.