<!--
 * Copyright (C) 2022 WYATT GROUP
 * Please see the AUTHORS file for details.
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
-->

<p align="center">

  <a href="https://wyattapp.io">
    <img width="150px" src="resources/wyatt-campus-logo.png">
  </a>
  <a href="https://wyatt-studio.fr">
    <img width="150px" src="resources/wyatt-studio-logo.png">
  </a>
  <h1 align="center">Wyatt Packages</h1>
</p>

<p align="center">
  <a href="https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages/src/branch/master/packages/wyatt_analysis">
    <img src="https://img.shields.io/badge/Style-Wyatt%20Analysis-blue.svg?style=flat-square" alt="Style: Wyatt Analysis" />
  </a>
  <a href="https://github.com/invertase/melos">
    <img src="https://img.shields.io/badge/Maintained%20with-melos-f700ff.svg?style=flat-square" alt="Maintained with Melos" />
  </a>
</p>

---

[[Changelog]](./CHANGELOG.md)

---

## About

Here is it a set of [Flutter plugins](https://flutter.io/platform-plugins/) that power up your applications.

[Flutter](https://flutter.dev) is Google's UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase. Flutter is used by developers and organizations around the world, and is free
and open source.

---

## Development

Clone this repo.

You have to install [melos](https://github.com/invertase/melos).

```shell
dart pub global activate melos
```

Then bootstrap with `melos bs`.

### Create a new package

Create a new package in `packages/` folder.

```shell
dart create -t package-simple wyatt_<name>
```

Remove any `example/` subfolder. Then create a new sample project.

```shell
flutter create --platforms android --project-name <name>_example example
```

Then bootstrap project with `melos bs` command.

### Convention

#### Naming

In the previous instructions `<name>` variable is important. 
It have to be clear and intelligible.

You **MUST** use underscores.

You **MUST** use `wyatt` prefix for package.

You **MUST** name example with specific name.

For example, if name is CRUD BLOC
- name will be crud_bloc
- so the package will be: `wyatt_crud_bloc`
- and the example will be: `crud_bloc_example`

#### Commits

See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

tl;dr : `type(scope): description`.
Here allowed <type> values:

- **feat** for a new feature for the user, not a new feature for build script. Such commit will trigger a release bumping a MINOR version.
- **fix** for a bug fix for the user, not a fix to a build script. Such commit will trigger a release bumping a PATCH version.
- **perf** for performance improvements. Such commit will trigger a release bumping a PATCH version.
- **docs** for changes to the documentation.
- **style** for formatting changes, missing semicolons, etc.
- **refactor** for refactoring production code, e.g. renaming a variable.
- **test** for adding missing tests, refactoring tests; no production code change.
- **build** for updating build configuration, development tools or other changes irrelevant to the user.

Some examples :

- `feat(auth): add AWS support.` = add a feature in authentication_bloc package.
- `docs: update readme.` = update **this** readme file.
- `fix(crud)!: fix bug in awesome() function.` = fix a bug, `!` is important and indicate `BREAKING CHANGES`.

Conventional commits are important for `melos version` command !

#### Badging

In the package `readme.md` file, please specify the supported SDK:

![SDK: Dart & Flutter](https://img.shields.io/badge/SDK-Dart%20%7C%20Flutter-blue?style=flat-square)

```markdown
![SDK: Dart & Flutter](https://img.shields.io/badge/SDK-Dart%20%7C%20Flutter-blue?style=flat-square)
```
or 

![SDK: Dart](https://img.shields.io/badge/SDK-Dart-blue?style=flat-square)

```markdown
![SDK: Dart](https://img.shields.io/badge/SDK-Dart-blue?style=flat-square)
```

---

## Usage

You can add any package of the `packages/` sub directory in your project.

```yaml
dependencies:
  wyatt_analysis:
    git:
      url: https://git.wyatt-studio.fr/Wyatt-FOSS/wyatt-packages
      ref: wyatt_analysis-v2.0.0
      path: packages/wyatt_analysis
```

Here you can change `package name` and `package version`.

---

## Status

![Status: Experimental](https://img.shields.io/badge/Status-WIP-red?style=flat-square)

This repository is maintained by Wyatt Studio but work is in progress.