# Forest- Treelab Forest Web Components

[![action](https://github.com/treelab/treelab-forest/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/treelab/treelab-forest/actions/workflows/npm-publish.yml)
[![npm version](https://badge.fury.io/js/%40treelab%2Fforest.svg)](https://www.npmjs.com/package/@treelab/forest)

Forestis a Treelab Component Library for solutions product.

## Development

### Setup

1. Clone repository.
2. Run `pnpm install` to install all dependencies.
3. Run `pnpm run storybook` to start local storybook server and start working on components.

### Linking `treelab-panda` directly from `treelab-forest`

First build panda

1. `cd path/to/treelab-panda-v3`
2. `yarn build`
3. `pnpm link --global`

Then link panda into `treelab-forest`

1. `cd path/to/treelab-forest`
2. `pnpm link --global @treelab/panda`

Restart `treelab-forest` in order for the linked forest package to be properly included in the build.

### Linking `treelab-forest` directly from `treelab-scm`

First build forest

1. `cd path/to/treelab-forest`
2. `pnpm build`

Then link forest into `treelab-scm`

1. `cd path/to/treelab-forest`
2. `pnpm link --global`
3. `cd path/to/treelab-scm`
4. `pnpm link --global @treelab/forest`

Restart `treelab-scm` in order for the linked forest package to be properly included in the build.

## Testing

1. `pnpm test`

## Publishing

All published versions can be found on [npmjs.com](https://www.npmjs.com/package/@treelab/forest)

Latest code can be built and published as an npm package using the [Create new release and publish to npm](https://github.com/treelab/treelab-forest/actions/workflows/npm-publish.yml) GitHub action. Please carefully choose a [semantic version](https://docs.npmjs.com/about-semantic-versioning) when executing `Run workflow` such that it is higher than the previous version published.

