UmiJSUmiJS
  • Introduce
  • Guide
  • API
  • Umi Max
  • Blog
⌘ K
中文
Getting Started
Development Environment
Directory Structure
Routing
Plugins
Mock
Proxy
Styles
Route Data Loading
TypeScript
Environment Variables
Scaffolding
Micro Generators
Coding Standards
Debugging
Testing
Plugin Development
Using Vue
MPA Mode
MFSU
Last updated:
Open-source MIT Licensed | Copyright © 2017-present

TABLE OF CONTENTS

Scaffolding

Umi officially provides a scaffold, which allows you to easily and quickly create a project:

# Input the path to the project directory when prompted by the wizard
pnpm create umi
# Create a project under the my-umi-app folder in the current directory
pnpm create umi my-umi-app

This command installs the create-umi scaffold and runs it automatically. After running, it offers two options:

  1. Pick Npm Client - Choose an Npm client

You can select your preferred Node dependency management tool from the following options:

  • npm
  • cnpm
  • tnpm
  • yarn
  • pnpm (officially recommended by Umi)
  1. Pick Npm Registry - Choose an Npm source
  • npm
  • taobao

After choosing, it will automatically generate the most basic Umi project and install dependencies based on the selected client and registry source:

.
├── package.json
├── pnpm-lock.yaml
├── src
│ ├── assets
│ │ └── yay.jpg
│ ├── layouts
│ │ ├── index.less
│ │ └── index.tsx
│ └── pages
│ ├── docs.tsx
│ └── index.tsx
├── tsconfig.json
└── typings.d.ts

This way, the initialization of the Umi project is completed with a single click.