Skip to content

Commit f6a04bb

Browse files
committed
docs: added README.md
1 parent a7c5f47 commit f6a04bb

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 innoai.tech
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# VueKit
2+
3+
## Code Structure
4+
5+
```
6+
nodepkg/ # monorepo 子 package, z
7+
<lib>/
8+
src/
9+
package.json
10+
11+
webapp/<APP_NAME>/
12+
mod/ # 业务模块
13+
auth/
14+
account/
15+
layout/
16+
client/
17+
page/ # File System Routing
18+
accounts/
19+
[id].tsx
20+
index.tsx
21+
accounts.tsx # 作为 /accounts/* 的 Wrap
22+
about.tsx
23+
index.tsx
24+
[...all].tsx # 其他
25+
```
26+
27+
## Misc
28+
29+
### File System Routing
30+
31+
虽然该功能是由 [vite-plugin-pages](https://github.com/hannoeru/vite-plugin-pages) 提供,
32+
但由于 meta 纯 yaml 配置,灵活性较差,这里利用 TypeScript JSDoc 的功能,直接将 meta 信息绑定到 `route.component` 上。
33+
定义如下:
34+
35+
```tsx
36+
/**
37+
* @property {"管理员"} meta.name
38+
* @property {typeof import("@mdi/js").mdiAccountSupervisor} meta.icon
39+
*/
40+
export default component(/*...*/);
41+
```

0 commit comments

Comments
 (0)