npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vite-plugin-vue-docs

v0.1.15

Published

vite plugin auto document generation for vue

Downloads

85

Readme

vite-plugin-vue-docs

介绍

vite 插件 - 自动生成 vue 组件文档网站。 在线体验

English | 中文

preview

特点

  • 支持热更新
  • 快速启动,依赖于 vite,无需另起服务
  • 自动生成组件导航
  • Demo在线查看
  • ui 采用了vant-ui的样式
  • 核心方法覆盖率达到了 92.86%

运行 example

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

使用

yarn add vite-plugin-vue-docs -D

配置 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: {
      // 必须添加这一行,否则无法使用
      vue: "vue/dist/vue.esm-bundler.js",
    },
  },
});

修改 main.{ts|js} 文件

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

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

// 导入demo组件
app.use(initVueDocsDemo);

引入类型文件

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

详细使用方法可参考 @vue-docs/example

配置

| 参数 | 说明 | 默认值 | | ------------ | -------------------- | ------------- | | base | 文档路由地址 | /docs | | componentDir | 组件路径 相对于 src | /components | | vueRoute | router 实例名称 | router | | showUse | 静态网站显示使用指南 | true | | header | 头部配置 | - |

Header

| 参数 | 说明 | 默认值 | | ----- | ---------------- | -------- | | title | 网站 header 标题 | 项目名称 |

计划

  • 🚀 表示已经实现的功能
  • 👷 表示进行中的功能
  • ⏳ 表示规划中的功能

| 功能 | 状态 | | -------------------------------------------- | --------- | | 可配置文档网站 | ⏳ 规划中 | | 兼容<script setup> | ⏳ 规划中 | | 兼容composition api | ⏳ 规划中 | | 可查看源代码 | 👷 进行中 | | 打包成静态网页 | 🚀 已完成 | | 页面跳转 history 模式 || hash 模式 | 🚀 已完成 | | 在线查看实例 | 🚀 已完成 | | 修改文件直接热更新,无须 F5 刷新 | 🚀 已完成 | | 支持解析slot | 🚀 已完成 | | 支持解析ref | 🚀 已完成 | | 支持type多种类型 | 🚀 已完成 | | 自动生成路由 | 🚀 已完成 |

CHANGELOG

更新日志