1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/meetqy-vite-plugin-vue-docs

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
Внести вклад в разработку кода
Синхронизировать код
Отмена
Подсказка: Поскольку Git не поддерживает пустые директории, создание директории приведёт к созданию пустого файла .keep.
Loading...
README.en.md

vite-plugin-vue-docs

npm version license Statements example deploy

Vite plugin - automatically generate Vue component documentation website. 在线体验

English | 中文

preview

Features

  • Support hot update
  • Quick start, rely on vite, no need to start another service
  • Automatically generated component navigation
  • Demo View online
  • ui adopts the style of vant-ui
  • Core method coverage reached 92.86%

Run example

git clone https://github.com/meetqy/vite-plugin-vue-docs.git
yarn
yarn setup
yarn dev

Use

yarn add vite-plugin-vue-docs -D

To configure vite-config.js

import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import vueDocs from "vite-plugin-vue-docs";

export default defineConfig({
  plugins: [vue(), vueDocs()],
  resolve: {
    alias: {
      // This line must be added, otherwise it cannot be used
      vue: "vue/dist/vue.esm-bundler.js",
    },
  },
});

Edit main.{ts|js}

import { createRouter } from "vue-router";
// Introducing virtual package
import { routes, initVueDocsDemo } from "virtual:vite-plugin-vue-docs";

const router = createRouter({
  // ...
  routes,
});

// Import demo components
app.use(initVueDocsDemo);

Import type file

// vite-env.d.ts
/// <reference types="vite-plugin-vue-docs/client" />

For detailed usage, please refer to @vue-docs/example

Config

Parameter Description Default
base Document routing address /docs
componentDir Component path relative to src /components
vueRoute Router instance name router
showUse Static website display guide true
header Header config -

Header

Parameter Description Default
title Website header title Project name

Plan

  • 🚀 Indicates the functions that have been implemented

  • 👷 Indicates a function in progress

  • ⏳ Represents the function in the plan

Function Status
Configurable document website ⏳ Planning
Compatible with < script setup > ⏳ Planning
Compatible with 'composition API' ⏳ Planning
You can view the source code 👷 Progress
Package into static web pages 🚀 Completed
The page jumps to history mode &#124&# 124; Hash mode 🚀 Completed
View instances Online 🚀 Completed
The modified file is directly hot updated without F5 refresh 🚀 Completed
Support parsing ` slot ' 🚀 Completed
Support parsing ` ref ' 🚀 Completed
Multiple types of 'type' are supported 🚀 Completed
Automatic route generation 🚀 Completed

CHANGELOG

CHANGELOG

Комментарии ( 0 )

Вы можете оставить комментарий после Вход в систему

Введение

Плагин Vite — анализирует документы Vue, автоматически генерирует документацию по компонентам. Поддерживает HMR (Hot Module Replacement) для динамического обновления, позволяет просматривать демо в режиме онлайн, упаковывает в статический веб-сайт, развёртывается на сервере. Развернуть Свернуть
TypeScript и 6 других языков
MIT
Отмена

Обновления

Пока нет обновлений

Участники

все

Недавние действия

Загрузить больше
Больше нет результатов для загрузки
1
https://api.gitlife.ru/oschina-mirror/meetqy-vite-plugin-vue-docs.git
git@api.gitlife.ru:oschina-mirror/meetqy-vite-plugin-vue-docs.git
oschina-mirror
meetqy-vite-plugin-vue-docs
meetqy-vite-plugin-vue-docs
devlop