@zfui/cli
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Vant Cli

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

特性

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

快速上手

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

yarn 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",
    "build": "vant-cli build",
    "prepare": "husky install",
    "release": "vant-cli release",
    "build-site": "vant-cli build-site"
  },
  "lint-staged": {
    "*.md": "prettier --write",
    "*.{ts,tsx,js,vue,less,scss}": "prettier --write",
    "*.{ts,tsx,js,vue}": "eslint --fix",
    "*.{vue,css,less,scss}": "stylelint --fix"
  },
  "eslintConfig": {
    "root": true,
    "extends": ["@vant"]
  },
  "stylelint": {
    "extends": ["@vant/stylelint-config"]
  },
  "prettier": {
    "singleQuote": true
  },
  "browserslist": ["Chrome >= 51", "iOS >= 10"]
}

详细文档

Readme

Keywords

Package Sidebar

Install

npm i @zfui/cli

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

154 kB

Total Files

129

Last publish

Collaborators

  • pei77