跳转到内容
View in the app

A better way to browse. Learn more.

彼岸论坛

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
欢迎抵达彼岸 彼岸花开 此处谁在 -彼岸论坛

[Vue.js] vue-ts 文档生成工具有没有推荐的? typedoc 不太好用

发表于

如题,vite 创建的 vue3 typescript 工程,注释什么的都写好了,想要用工具直接生成对应 md 文档文件。

尝试过 typedoc ,对单一 .ts 文件支持不错,对 .vue 文件就不太行,即使加上了 typedoc-plugin-vue 插件也不太行,因为是用 <script setup> 写的,插件只支持 definecomponent 定义出来的组件。

也想过写个脚本遍历工程,提取 <script> 标签下的内容写个临时的 .ts 文件,生成完文档直接删,但是 typedoc 好像命令行没有什么设置能一次仅处理一个文件。

所以有没有什么好用的工具能直接生成对应文档的?求推荐

# typedoc.json
{
    "$schema": "https://typedoc.org/schema.json",
    "entryPoints": ["../src/App.vue"],
    "out": "./docs",
    "plugin": [
        "typedoc-plugin-vue",
        "typedoc-plugin-markdown"
    ]
}
# 项目结构示意
# {project}
- public
- typedoc
  - docs
  - package.json
  - typedoc.json
- src
  - components
    - Title
      - Title.vue
      - type.ts
  - router
    - index.ts
    - type.ts
  - store
    - index.ts
    - type.ts
  - views
    - Home
      - Home.vue
      - type.ts
    - Config
      - Config.vue
      - type.ts
  - App.vue
  - main.ts
  - types.ts
- index.html
- tsconfig.json
- vite.config.ts
- package.json

Featured Replies

No posts to show

创建帐户或登录来提出意见

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.