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

@ektx/v-book

v0.7.1

Published

Make Vue Demo Easy!!

Downloads

14

Readme

VBook

[TOC]

Make Vue Demo Easy!!

欢迎你使用 VBook。
VBook 希望可以帮助你高效的书写 Vue 组件库文档。

特性

  • 简单易用。
  • 快速搭建自己的 Vue 组件或示例的文档。
  • 灵活的定制化,可以自己调整风格与主题。

安装

npm i -g @ektx/v-book

使用

# 进入你需要展示的 markdown 目录
cd doc

# 初始化目录
vbook init

# 运行
vbook run

# 帮助
vbook -h

基础约定

项目结构

 Project
  ├─── doc (示例)markdown示例文档目录
  │  ├─── readme.md (可选)markdown文档,这里只列一个
  │  ├─── index.js  (必须 自动)vbook 展示控制文件
  |  ├─── .vbook    (必须 自动)功能扩展目录
  |     ├─── enhance.js  (可选)自定义组件库引用与第三方组件库扩展
  ├─── src          (示例)组件库位置,可以自定义位置
  │  ├─── index.js  (示例)组件库主入口
  │  ├─── styles    (示例)组件库样式文件夹
  │     ├─── index.less (示例)样式文件主入口,支持index.sass

说明:

  • 示例:例子,用户可以自定义文件(夹)位置与名称
  • 可选:非必须文件,用户可以删除或自己创建类似文件
  • 必须:vbook运行必须文件,不可删除
  • 自动:vbook运行或初始化会自动生成

index.js 规则

export default {
  // 页面标题
  title: 'VBook',
  // logo地址
  logo: '',
  // 侧边菜单内容列表
  aside: [
    {
      label: '使用指南',
      children: [
        {
          label: '使用指南',
          // doc/readme.md
          file: 'readme'
        }
      ]
    },
  ]
}

enhance.js

enhance.js 用于添加自己的组件库或引用第三方组件(库)。

// root/index => Project/src/index.js
import VC from 'root/index';
import ElementUI from 'element-ui';

import 'root/styles/index.less'
import 'element-ui/lib/theme-chalk/index.css';

export default (Vue) => {
  Vue.use(VC)
  Vue.use(ElementUI)
}

rootProject/src 目录

兼容性

| Chrome | Firefox | IE | Edge | Safari | | :---: | :-----: | :---: | :---: | :----: | | 49+ | 31+ | - | 16+ | 9.1+ |

CSS Variables