xy-manual-tools
一个UI组件的文档演示工具
Last updated 21 days ago by xueyou2000 .
MIT · Original npm · Tarball · package.json
$ cnpm install xy-manual-tools 
SYNC missed versions from official npm registry.

xy-manual-tools

组件库的 demo 管理工具

安装

yarn add --dev xy-manual-tools

使用配置

为了按需加载, 需要修改package.json里增加sideEffects字段:

{
    "sideEffects": ["*.css", "*.scss"]
}

xy-button为例子(实际根据自己组件修改), 修改tsconfig.jsonpaths字段:

{
    "paths": {
        "xy-button": ["src/index.tsx"],
        "xy-button/*": ["src/*"]
    }
}

修改README.md, 确保有## API 表格(表格根据自己的 API 修改)这一段:

| 属性 | 说明     | 类型    | 默认值 |
| ---- | -------- | ------- | ------ |
| show | 是否显示 | boolean | true   |

创建配置文件xy-manual-tools.json在根目录:

其中name字段需要与examples文件夹内的例子文件名对应, 才能找到 demo 文件

[
    {
        "name": "Simple",
        "title": "顶部固定",
        "desc": "当窗口滚动过元素时, 将会启动固定。"
    }
]

开发

参数-s启用打包独立页面, 每个例子都在单独的路由访问

xy-manual-tools start -p 6006

编译

参数-s启用打包独立页面, 每个例子都在单独的路由访问

xy-manual-tools build

Current Tags

  • 0.3.0                                ...           latest (21 days ago)

28 Versions

  • 0.3.0                                ...           21 days ago
  • 0.2.2                                ...           21 days ago
  • 0.2.1                                ...           a month ago
  • 0.2.0                                ...           a month ago
  • 0.1.67                                ...           3 months ago
  • 0.1.66                                ...           3 months ago
  • 0.1.65                                ...           3 months ago
  • 0.1.64                                ...           3 months ago
  • 0.1.63                                ...           6 months ago
  • 0.1.62                                ...           6 months ago
  • 0.1.61                                ...           6 months ago
  • 0.1.6                                ...           6 months ago
  • 0.1.51                                ...           6 months ago
  • 0.1.5                                ...           6 months ago
  • 0.1.4                                ...           7 months ago
  • 0.1.3                                ...           7 months ago
  • 0.1.2                                ...           7 months ago
  • 0.1.1                                ...           7 months ago
  • 0.1.0                                ...           7 months ago
  • 0.0.9                                ...           7 months ago
  • 0.0.8                                ...           7 months ago
  • 0.0.7                                ...           7 months ago
  • 0.0.6                                ...           7 months ago
  • 0.0.5                                ...           7 months ago
  • 0.0.4                                ...           7 months ago
  • 0.0.3                                ...           7 months ago
  • 0.0.2                                ...           7 months ago
  • 0.0.1                                ...           7 months ago
Maintainers (1)
Downloads
Today 28
This Week 28
This Month 28
Last Day 0
Last Week 0
Last Month 90
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |