Skip to content

Commit

Permalink
docs(更新导航栏并增强文档说明): 更新导航栏并增强文档说明
Browse files Browse the repository at this point in the history
- 注释掉导航栏中的“快速上手”项以避免重复。

- 增加了关于项目初衷和解决痛点的前言部分。

- 扩展特性说明,明确技术选型和功能支持。
  • Loading branch information
Null committed Aug 6, 2024
1 parent eb25ad3 commit d41b6b4
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default defineConfig({
items: [
{ text: '介绍', link: '/guide' },
{ text: '安装', link: '/install' },
{ text: '快速上手', link: '/start' },
// { text: '快速上手', link: '/start' },
]
},
{
Expand Down
23 changes: 19 additions & 4 deletions docs/guide.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@


# Web Vue3 Hooks Code


## 🚀 前言

### 1. 项目简介
本项目的初衷是为了输出 Vue 自定义的 `useHooks` 和一些常用的工具函数。随着项目的发展,我们意识到这些 `useHooks` 需要有一个示例文档来帮助用户更好地理解和使用。

### 2. 解决的痛点

1. 文件管理复杂:新增文件夹、导入和导出 useHooks 方法繁琐,尤其是在团队开发中,代码合并问题频发。
2. 自动化程度低:手动更新文档和目录容易出错且效率低下。


## ⛰️ 能力支持

Expand All @@ -12,12 +24,15 @@

支持文档记录,支持 demo 演示

### 2. 支持 cli 以及 watch监听文件变化
### 3. 支持 cli 以及 watch监听文件变化


- 采用 pnpm cli 命令 构建文件目录
- 采用 watch 监听文件变化
- generate-docs 文档构建
1. 输出 Vue 自定义 useHooks:提供一系列常用的工具函数,方便开发者在项目中复用。
2. 示例文档:为每个 useHooks 提供详细的示例文档,帮助用户快速上手。
3. 自动化文件管理:
- 使用 inquirer/prompts 实现人机交互,创建文件夹和 CLI 命令。
- 构建文件目录并自动映射到输出目录和 VitePress 目录。
- 通过 watch 监听文件变化,自动更新 VitePress 目录。

## ⚒️ 技术选型

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ hero:
---

## ✨ 特性
- 支持使用 cli方式 创建 useHooks目录,自动映射
- 支持使用 cli方式 创建 文件目录,自动映射
- 可靠的代码健壮:使用 Typescript 构建,提供完善的类型定义文件
- 完善的文档能力:支持文档记录,支持 demo 演示

Expand Down
41 changes: 41 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 安装

::: tip :100: Node版本
Node.js >= 16.0.0
:::


## pnpm (推荐)
``` bash
$ pnpm install zhongjiayao_v3_hooks
```


## npm
``` bash
$ npm install zhongjiayao_v3_hooks
```


## yarn
``` bash
$ yarn install zhongjiayao_v3_hooks
```



## CDN 引入

目前可以通过 [unpkg.com/zhongjiayao_v3_hooks](https://unpkg.com/browse/[email protected]/) 获取到最新版本的资源,在页面上引入 js 即可开始使用。

``` bash
<script src="https://unpkg.com/zhongjiayao_v3_hooks/dist/zhongjiayao_v3_hooks.js"></script>


console.log(window.zhongjiayao_v3_hooks)
```





3 changes: 2 additions & 1 deletion docs/introduce.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
# 介绍
# 介绍

0 comments on commit d41b6b4

Please sign in to comment.