A comprehensive TypeScript CLI tool for building Vue component libraries with development server, build pipeline, and documentation generation.
—
Primary interface for Vue component library development workflows. Provides seven core commands for development, building, testing, and publishing Vue component libraries.
Starts a development server for the documentation site with hot reload support.
# Start development server
vant-cli devUsage:
vant-cli devCompiles components in production mode with comprehensive build pipeline including multiple output formats.
# Build production package
vant-cli buildBuild Pipeline Steps:
Usage:
vant-cli buildCompiles the documentation site in production mode for deployment.
# Build documentation site
vant-cli build-siteUsage:
vant-cli build-siteRemoves all build output directories to ensure clean builds.
# Clean all build outputs
vant-cli cleanUsage:
vant-cli cleanRuns ESLint with automatic fixing on source files.
# Run ESLint with automatic fixing
vant-cli lintUsage:
vant-cli lintComprehensive package release workflow with version management, building, and publishing.
# Release package (interactive)
vant-cli release
# Release with specific options
vant-cli release --tag <tag> --gitTagRelease Workflow:
Tag Detection:
1.0.0-beta.1 → beta tag1.0.0-alpha.1 → alpha tag1.0.0-rc.1 → rc tag1.0.0 → latest tagUsage:
vant-cli release # Basic release
vant-cli release --tag beta # Force beta tag
vant-cli release --gitTag # Create git tag
vant-cli release --tag beta --gitTag # Both optionsValidates commit messages against conventional commit format.
# Validate commit message
vant-cli commit-lint <git-params-file>Supported Commit Types:
fix(Component): description - Bug fixesfeat(Component): description - New featuresdocs(Component): description - Documentation updatesperf(Component): description - Performance improvementstest(Component): description - Test additionstypes(Component): description - Type definition updatesstyle(Component): description - Code style changesbuild(Component): description - Build system changeschore(Component): description - Maintenance tasksrelease(Component): description - Release commitsrefactor(Component): description - Code refactoringbreaking change(Component): description - Breaking changesMerge branch 'foo' into 'bar' - Merge commitsUsage:
vant-cli commit-lint <git-params-file>Commands automatically manage environment variables for consistent builds:
NODE_ENV - Set to 'development' or 'production' based on commandBABEL_MODULE - Set to 'esmodule' or 'commonjs' during compilationBUILD_TARGET - Set to 'site' or 'package' based on build typeVANT_CLI_VERSION - Current CLI versionAll commands implement consistent error handling:
Install with Tessl CLI
npx tessl i tessl/npm-vant--cli