@vant/cli
Vant Cli 是一个 Vue 组件库构建工具,通过 Vant Cli 可以快速搭建一套功能完备的 Vue 组件库。
Last updated 8 days ago by chenjiahan .
MIT · Original npm · Tarball · package.json
$ cnpm install @vant/cli 
SYNC missed versions from official npm registry.

Vant Cli

Vant Cli 是一个 Vue 组件库构建工具,通过 Vant Cli 可以快速搭建一套功能完备的 Vue 组件库。

特性

  • 提供丰富的命令,涵盖从开发测试到构建发布的完整流程
  • 基于约定的目录结构,自动生成优雅的文档站点和组件示例
  • 内置 ESlint、Stylelint 校验规则,提交代码时自动执行校验
  • 构建后的组件库默认支持按需引入、主题定制、Tree Shaking

快速上手

执行以下命令可以快速创建一个基于 Vant Cli 的项目:

npx create-vant-cli-app

手动安装

# 通过 npm 安装
npm i @vant/cli -D

# 通过 yarn 安装
yarn add @vant/cli --dev

安装完成后,请将以下配置添加到 package.json 文件中

{
  "scripts": {
    "dev": "vant-cli dev",
    "test": "vant-cli test",
    "lint": "vant-cli lint",
    "release": "vant-cli release",
    "build-site": "vant-cli build-site"
  },
  "husky": {
    "hooks": {
      "pre-commit": "lint-staged",
      "commit-msg": "vant commit-lint"
    }
  },
  "lint-staged": {
    "*.{js,jsx,ts,tsx,vue}": "eslint --fix",
    "*.{vue,css,less,scss}": "stylelint --fix"
  },
  "eslintConfig": {
    "root": true,
    "extends": ["@vant"]
  },
  "stylelint": {
    "extends": ["@vant/stylelint-config"]
  },
  "prettier": {
    "singleQuote": true
  },
  "browserslist": ["Android >= 4.0", "iOS >= 8"]
}

详细文档

微信讨论群

扫码加入 Vant Cli 交流群,若群二维码过期,可以联系有赞前端小秘书加群

关于桌面端组件

目前 Vant Cli 仅支持移动端组件的预览,桌面端组件暂不支持预览(欢迎 PR)。

Current Tags

  • 3.0.0-alpha.0                                ...           alpha (7 days ago)
  • 2.0.0-beta.25                                ...           beta (6 months ago)
  • 2.5.1                                ...           latest (8 days ago)
  • 2.0.0-rc.11                                ...           rc (5 months ago)

74 Versions

  • 3.0.0-alpha.0                                ...           7 days ago
  • 2.5.1                                ...           8 days ago
  • 2.5.0                                ...           8 days ago
  • 2.4.2                                ...           a month ago
  • 2.4.1                                ...           2 months ago
  • 2.4.0                                ...           2 months ago
  • 2.3.1                                ...           2 months ago
  • 2.3.0                                ...           2 months ago
  • 2.2.8                                ...           2 months ago
  • 2.2.7                                ...           3 months ago
  • 2.2.6                                ...           3 months ago
  • 2.2.5                                ...           3 months ago
  • 2.2.4                                ...           4 months ago
  • 2.2.3                                ...           4 months ago
  • 2.2.2                                ...           4 months ago
  • 2.2.1                                ...           4 months ago
  • 2.2.0                                ...           5 months ago
  • 2.1.8                                ...           5 months ago
  • 2.1.7                                ...           5 months ago
  • 2.1.6                                ...           5 months ago
  • 2.1.5                                ...           5 months ago
  • 2.1.4                                ...           5 months ago
  • 2.1.3                                ...           5 months ago
  • 2.1.2                                ...           5 months ago
  • 2.1.1                                ...           5 months ago
  • 2.1.0                                ...           5 months ago
  • 2.0.0                                ...           5 months ago
  • 2.0.0-rc.11                                ...           5 months ago
  • 2.0.0-rc.10                                ...           5 months ago
  • 2.0.0-rc.9                                ...           5 months ago
  • 2.0.0-rc.8                                ...           5 months ago
  • 2.0.0-rc.7                                ...           5 months ago
  • 2.0.0-rc.6                                ...           6 months ago
  • 2.0.0-rc.5                                ...           6 months ago
  • 2.0.0-rc.4                                ...           6 months ago
  • 2.0.0-rc.3                                ...           6 months ago
  • 2.0.0-rc.2                                ...           6 months ago
  • 2.0.0-beta.25                                ...           6 months ago
  • 2.0.0-beta.24                                ...           6 months ago
  • 2.0.0-rc.1                                ...           6 months ago
  • 2.0.0-rc.0                                ...           6 months ago
  • 2.0.0-beta.23                                ...           6 months ago
  • 2.0.0-beta.22                                ...           6 months ago
  • 2.0.0-beta.21                                ...           6 months ago
  • 2.0.0-beta.20                                ...           6 months ago
  • 2.0.0-beta.19                                ...           6 months ago
  • 2.0.0-beta.18                                ...           6 months ago
  • 2.0.0-beta.17                                ...           6 months ago
  • 2.0.0-beta.16                                ...           6 months ago
  • 2.0.0-beta.15                                ...           6 months ago
  • 2.0.0-beta.14                                ...           6 months ago
  • 2.0.0-beta.13                                ...           6 months ago
  • 2.0.0-beta.12                                ...           6 months ago
  • 2.0.0-beta.11                                ...           6 months ago
  • 2.0.0-beta.10                                ...           6 months ago
  • 2.0.0-beta.9                                ...           6 months ago
  • 2.0.0-beta.8                                ...           6 months ago
  • 2.0.0-beta.7                                ...           6 months ago
  • 2.0.0-beta.6                                ...           6 months ago
  • 2.0.0-beta.5                                ...           6 months ago
  • 2.0.0-beta.3                                ...           7 months ago
  • 2.0.0-beta.2                                ...           7 months ago
  • 2.0.0-beta.1                                ...           7 months ago
  • 2.0.0-beta.0                                ...           7 months ago
  • 1.0.6                                ...           9 months ago
  • 1.0.5                                ...           9 months ago
  • 1.0.4                                ...           9 months ago
  • 1.0.3                                ...           9 months ago
  • 1.0.2                                ...           9 months ago
  • 1.0.1                                ...           9 months ago
  • 1.0.0                                ...           9 months ago
  • 0.1.2                                ...           9 months ago
  • 0.1.1                                ...           9 months ago
  • 0.1.0                                ...           9 months ago
Downloads
Today 20
This Week 167
This Month 167
Last Day 28
Last Week 352
Last Month 1,175
Dev Dependencies (6)

Copyright 2014 - 2016 © taobao.org |