npm package: @lamimed/utils
Description: <div id="top"></div>
Author: Lamimed
Latest version: 2.0.0

<div id="top"></div>

<br />
<div align="center">
  <a href="https://github.com/lami-health/website">
    <img src="https://github.com/lami-health/website/blob/main/public/images/logo.png" alt="Lami" width="150" height="65">
  </a>

  <h3 align="center">@lamimed/utils</h3>
</div>

<details>
  <summary>Table of Contents</summary>
  <ol>
    <li>
      <a href="#about-the-project">About The Project</a>
      <ul>
        <li><a href="#built-with">Built With</a></li>
      </ul>
    </li>
    <li>
      <a href="#getting-started">Getting Started</a>
      <ul>
        <li><a href="#prerequisites">Prerequisites</a></li>
        <li><a href="#installation">Installation</a></li>
      </ul>
    </li>
    <li><a href="#usage">Usage</a></li>
    <li><a href="#continuous-integration">Continuous Integration</a></li>
    <li><a href="#contributing">Contributing</a></li>

  </ol>
</details>

## About The Project

[@lamimed/utils](https://www.npmjs.com/package/@lamimed/utils) is an npm package with a collection of utility functions, hooks, and patterns that aims to allow code sharing between all the Lami frontends projects.

<p align="right">(<a href="#top">back to top</a>)</p>

### Built With

The Project comes with a complete set of modern tools and libraries, including:

- [Parcel](https://parceljs.org/)
- [TypeScript](https://www.typescriptlang.org/)
- [Eslint](https://eslint.org/)
- [Prettier](https://prettier.io/)
- [Husky](https://github.com/typicode/husky)
- [Size Limit](https://github.com/ai/size-limit)

<p align="right">(<a href="#top">back to top</a>)</p>

## Getting Started

Some information for a quick installation of the project

### Prerequisites

- pnpm
  ```sh
  corepack enable
  ```

### Installation

This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` cause a rebuild to `/dist`.

1. Clone the repo using SSH
   ```sh
   git clone git@github.com:lami-health/utils-frontend.git
   ```
2. Install Pnpm packages
   ```sh
   pnpm i
   ```
3. Running the project

   ```sh
   pnpm start
   ```

4. Using the project locally (with Yarn):
   ```sh
   yarn link
   ```

### Publishing the library

To update the package, after being assured that the build has been done, change the version in package.json, login to npm and publish the package.

```bash
pnpm login
```

Write the username and the password. And then:

```bash
pnpm publish
```

### Bundle analysis

Calculate the real cost of your library using [size-limit](https://github.com/ai/size-limit) with `yarn size`, or visualize detailed analysis running `pnpm build` and opening `parcel-bundle-reports/main.html` in the browser.

<p align="right">(<a href="#top">back to top</a>)</p>

## Usage

Project structure:

```
# To be defined
```

<p align="right">(<a href="#top">back to top</a>)</p>

## Continuous Integration

### GitHub Actions

Three actions are added by default:

- `main` which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix
- `publish` which publish the package to npmjs on main pushes.
- `size` which comments cost comparison of your library on every pull request using [size-limit](https://github.com/ai/size-limit)

<p align="right">(<a href="#top">back to top</a>)</p>

## Contributing

We use the tag generated in Jira, so it links the commit to the jira card.

1. Create your Feature Branch (`git checkout -b feature/TEC-2-Amazing-Feature`)
2. Commit your Changes (`git commit -m 'feat: add some amazing feature'`)
3. Push to the Branch (`git push origin feature/TEC-2-Amazing-Feature`)
4. Open a Pull Request

[Semantic commit messages](https://lamimed.atlassian.net/wiki/spaces/TEC/pages/130744321/Commits+semanticos+para+git)

Screenshot:

<img src="https://user-images.githubusercontent.com/10669905/142291399-6b628580-3781-41e2-adb8-512368b0e60e.png"  width="600">

<p align="right">(<a href="#top">back to top</a>)</p>