Skip to content

Latest commit

 

History

History
120 lines (78 loc) · 2.95 KB

File metadata and controls

120 lines (78 loc) · 2.95 KB

Contributing

The following documentation is only for the maintainers of this repository.

Monorepo setup

This repository is managed as a monorepo with PNPM workspace to handle the installation of the npm dependencies and manage the packages interdependencies.

It's important to note that PNPM workspace doesn't hoist the npm dependencies at the root of the workspace as most package manager does. Instead, it uses an advanced symlinked node_modules structure. This means that you'll find a node_modules directory inside the packages folders as well as at the root of the repository.

The main difference to account for is that the devDependencies must now be installed locally in every package package.json file rather than in the root package.json file.

Turborepo

This repository use Turborepo to execute it's commands. Turborepo help saving time with it's built-in cache but also ensure the packages topological order is respected when executing commands.

To be understand the relationships between the commands, have a look at this repository turbo.json configuration file.

Installation

This project uses PNPM, therefore, you must install PNPM v9+ first:

npm install -g pnpm

To install the dependencies of this repository, open a terminal at the root of the workspace and execute the following commands:

pnpm i

You must then run the following command to run the following command to build all the packages:

pnpm build:pkg

Then, use any of the available commands to start developing.

Commands

doc:start

You need to run this once to generate the previews for components.

pnpm doc:generate

Then you can start a watch process for the documentation website.

pnpm doc:start

dev:mcp

You have to build the docs first.

pnpm doc:generate
pnpm build:doc
pnpm build:ai-docs

Then you can start a watch process for the mcp server.

pnpm dev:mcp

dev:basic

Start a watch process for the basic sample website. The main goal was to test that everything is properly exported from the Hopper.

pnpm dev:basic

storybook

You can then run storybook to see the components in action:

pnpm storybook

test

Run the unit tests.

pnpm test

lint

Lint the files.

pnpm lint

Contributing to packages