Merged in docs/component_folder_structure (pull request #50)

Add documentation for frontend folder structure

* Add documentation for frondend folder structure


Approved-by: Daniel Egger
This commit is contained in:
Elia Bieri 2023-03-29 13:00:25 +00:00
parent 0c0c65cc22
commit 1da8293914
1 changed files with 17 additions and 0 deletions

View File

@ -167,3 +167,20 @@ The following steps were taken to set it up:
> 💡 The number of cypress worker jobs depends on the number of cypress tests.
> Too many workers for too few tests will result in a lot of idle workers.
## Frontend folder structure
There are some rules when it comes to the folder structure of the frontend.
- Every page should have its own folder in the `pages` folder.
- A page component name must have the `Page` suffix. E.g. `MyPage.vue`.
- A page is defined by being a routing target.
- The components solely being used in a page should be in the same folder as the page.
```
📦 client
└─ pages
   ├─ AbcPage.vue
   ├─ AbcButton.vue
   └─ AbcListTile.vue
```