Command-line interface providing development, build, and setup commands for dumi projects.
Start a development server with hot reloading for documentation development.
dumi devUsage:
# Start development server on default port
dumi dev
# The development server will:
# - Watch for file changes and hot reload
# - Serve documentation site locally
# - Generate component demos and API tables
# - Enable live editing of code examplesBuild the documentation site for production deployment.
dumi buildUsage:
# Build for production
dumi build
# Output:
# - Generated static files in dist/ directory
# - Optimized assets and bundles
# - Static HTML for all documentation pages
# - Component demos as separate chunksInitialize a new dumi project or configure an existing project.
dumi setupUsage:
# Initialize dumi in current directory
dumi setup
# This command will:
# - Create necessary configuration files
# - Set up basic project structure
# - Install required dependencies
# - Generate sample documentation filesDisplay version information for the dumi CLI.
dumi --version
dumi -vDisplay help information and available commands.
dumi --help
dumi -hThe CLI respects several environment variables for configuration:
# Disable caching
DUMI_CACHE=none dumi dev
# Set custom presets
DUMI_PRESETS=preset1,preset2 dumi build
# Set app root directory
APP_ROOT=/path/to/app dumi devTypical development workflow with dumi CLI:
# 1. Initialize new project
dumi setup
# 2. Start development
dumi dev
# 3. Build for production
dumi buildDumi CLI can be integrated with package.json scripts:
{
"scripts": {
"dev": "dumi dev",
"build": "dumi build",
"setup": "dumi setup"
}
}