Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update readme file #1016

Merged
merged 11 commits into from
Jun 27, 2024
79 changes: 16 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,86 +6,39 @@ Malty is a Design System, and the code contained in this repository is its Compo

- **You don't have to clone this repo** in order to use Malty, and this Component Library.
- Development of components for this library **must be in close coordination with Malty's Maintainers**, and should only happen after previous coordination in [Malty's GitHub Discussions](https://github.com/CarlsbergGBS/cx-component-library/discussions) or an [issue](https://github.com/CarlsbergGBS/cx-component-library/issues) has been created and approved to move forward.
- This repository should be considered our file system, and the means by which we manage contributions and maintainance of components in [Carlsberg Group's Bit.dev Cloud](https://bit.dev/carlsberggroup).
- This repository should be considered our file system, and the means by which we manage contributions and maintainance of components in [Malty Carlsberg Group's](https://malty.carlsberggroup.com/).

## Install CLI
<!-- GETTING STARTED -->

You must have Bit CLI installed in order to run the Component Library locally. The following are the commands to run:
## Getting Started
This project uses Lerna to manage the monorepo packages and GitHub Packages to publish each component.

Start installing [BVM](https://bit.dev/docs/reference/using-bvm), Bit's Version Manager:
### Install

```bash
yarn global add @teambit/bvm
```

Then install Bit:
Clone the repo

```bash
bvm install
```sh
git clone https://github.com/CarlsbergGBS/cx-component-library
```

You will then, most likely, need to run the following command in order to access the new `bit` binary:
Install packages

```bash
echo 'export PATH=$(yarn global bin):$PATH' >> ~/.zshrc && source ~/.zshrc
```

Alternatively, if the above doesn't work, you can run the following command:

```bash
echo 'export PATH=$(yarn global bin):$PATH' >> ~/.bashrc && source ~/.bashrc
```sh
yarn install
```

For more detailed instructions on how do install Bit CLI, please [look here](https://malty.carlsberggroup.com/5715d933c/p/36d196-development).
Build packages

## Register the Scope

To install component packages, using npm or yarn, configure your package manager to use your scope owner name (Bit organization [@carlsberggroup]) as a scoped registry:

```bash
npm config set @carlsberggroup:registry https://node.bit.dev
```

### Login

:warning: **You only need a Bit account**, and to login **if you are a Malty Maintainer** :nerd_face:

```bash
bit login
```

For more details on how to Register the Scope, please [look here](https://malty.carlsberggroup.com/5715d933c/p/36d196-development-starter).

## Running local environment

### Bit local env.

Use [Bit](https://bit.dev/docs/quick-start) to install all dependencies, and compile all components locally, and run your local Dev server.

Start installing all necessary dependencies:

```bash
bit install
```

Then compile all components locally:

```bash
bit compile
```

You can then start your local Dev server:

```bash
bit start
```sh
yarn build
```

### Storybook local env.
### Run storybook local env.

To start your local dev. server:

```bash
yarn storybook
yarn start
```

To build Storybook static files:
Expand Down
Loading