Skip to content

Commit b1acff0

Browse files
committed
refactor: update readme
1 parent b4d51df commit b1acff0

File tree

1 file changed

+19
-21
lines changed

1 file changed

+19
-21
lines changed

apps/ui/README.md

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,33 +56,31 @@ npm run dev
5656
├── useLocalStorage.ts
5757
```
5858

59-
### Pages
59+
### Modules
6060

61-
**Description:** Pages lives under the `pages` folder, the page should be a folder, and they are registered in the app router.
61+
**Description:** Modules lives under the `modules` folder and they can have their own components, composables, pages, services, etc.
6262

63-
**filename convention:** The filename of the page should be in `PascalCase` and must have the prefix `Page`.
63+
**filename convention:**
6464

65-
**Rules:**
66-
67-
- The page should be a folder
68-
- The page folder should have a `[PageName].vue` file inside
69-
- Page local components should be inside the page `components` folder and should have the prefix of the page name
70-
- Page local composables of the page should be inside the page `composables` folder
65+
- module: Modules folder name must be in should be in `camelCase`
66+
- components: The filename of the component should be in `PascalCase` and must have the prefix of the module name. Example: `ModuleNameComponentName.vue`
67+
- composables: The filename of the composable should be in `camelCase` and they not need to have the prefix of the module name.
7168

7269
**Example:**
7370

7471
```
75-
pages/
76-
├── HomePage/
77-
│ ├── HomePage.vue
72+
modules/
73+
├── myModule/
7874
| ├── composables/
79-
| | ├── useHomePage.ts
80-
| | └── useHomePage.spec.ts
81-
│ └── components/
82-
│ ├── HomePageHeader.vue
83-
│ └── HomePageFooter.vue
84-
├── AboutPage/
85-
│ ├── AboutPage.vue
86-
│ └── components/
87-
│ ├── AboutPageHeader.vue
75+
| | ├── useModuleComposable.ts
76+
| | └── useAnotherModuleComposable.spec.ts
77+
| ├── components/
78+
| | ├── MyModuleComponent.vue
79+
| | └── AnotherModuleComponent.vue
80+
| ├── pages/
81+
| | ├── MyModulePage.vue
82+
| | └── AnotherModulePage.vue
83+
| ├── services/
84+
| | ├── myModuleService.ts
85+
| | └── anotherModuleService.ts
8886
```

0 commit comments

Comments
 (0)