docs: update readme with some instructions
This commit is contained in:
parent
17ae855ffb
commit
bb264b7362
74
README.md
74
README.md
@ -63,22 +63,55 @@ dart pub global activate melos
|
||||
|
||||
Then bootstrap with `melos bs`.
|
||||
|
||||
---
|
||||
### Create a new package
|
||||
|
||||
## Usage
|
||||
Create a new package in `packages/` folder.
|
||||
|
||||
You can add any package of the `packages/` sub directory in your project.
|
||||
|
||||
```yaml
|
||||
dependencies:
|
||||
wyatt_analysis:
|
||||
git:
|
||||
url: ssh://git@git.wyatt-studio.fr:993/Wyatt-FOSS/wyatt-packages.git
|
||||
ref: wyatt_analysis-v2.0.0
|
||||
path: packages/wyatt_analysis
|
||||
```shell
|
||||
dart create -t package-simple wyatt_<name>
|
||||
```
|
||||
|
||||
Here you can change `package name` and `package version`.
|
||||
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` where type can be **feat, fix, docs, chores, ci, perf, refactor, style, test**, and scope is package name.
|
||||
|
||||
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:
|
||||
|
||||
@ -97,6 +130,23 @@ or
|
||||
|
||||
---
|
||||
|
||||
## 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
|
||||
|
||||

|
||||
|
Loading…
x
Reference in New Issue
Block a user