Socket
Book a DemoInstallSign in
Socket

vvdoc

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vvdoc

## 特性

npmnpm
Version
2.2.1
Version published
Weekly downloads
4
300%
Maintainers
1
Weekly downloads
 
Created
Source

文档生成工具

特性

  • 基于mdx,可以直接在文档里面写react组件
  • 基于vite 启动速度快,编写体验极佳
  • 简单,便捷
  • 支持暗黑模式

开始使用

npm create vvdoc
npm i
npm run dev

vvdoc.config.json

{
  "title": "vvModal", // 文档标题
  "logo": "", // 文档logo
  "repository": "https://github.com/zwmmm/vvModal", // 代码仓库地址
  "menus": { // 右上角的菜单
    "/": "首页",
    "/apis": "API",
    "http://www.baidu.com": "外链"
  },
  "chapters": { // 对应页面的 侧边栏菜单
    "apis": [
      {
        "name": "Apis",
        "children": [
          {
            "name": "create",
            "path": "/apis"
          },
          {
            "name": "show",
            "path": "/apis/show"
          },
          {
            "name": "antdModal",
            "path": "/apis/antdModal"
          }
        ]
      },
      {
        "name": "Hooks",
        "children": [
          {
            "name": "useModal",
            "path": "/apis/useModal"
          },
          {
            "name": "useShow",
            "path": "/apis/useShow"
          },
          {
            "name": "useHide",
            "path": "/apis/useHide"
          }
        ]
      }
    ]
  }
}

自定义入口

当你需要自定义入口,比如全局修改Antd的配置 根目录新增一个 index.tsx

import { ConfigProvider } from 'antd'
import zhCN from 'antd/lib/locale/zh_CN'

export default function (props: any) {
  return (
    <ConfigProvider locale={zhCN} componentSize="small">
      {props.children}
    </ConfigProvider>
  )
}

FAQs

Package last updated on 15 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts