Initialisation
This section provides an overview of how to get started with the umi init command.
Intro
The init command is used to initialise a new project.
umi init
Options
Option | Description | Default |
---|---|---|
-y, --yes | Skip prompts and use default values. | None |
-n, --name <name> | Set the name of the project | None |
Examples
Initialising a new project
umi init
Skipping prompts
umi init --yes
umi init -y
Adding a name
umi init --name my-project
umi init -n my-project
How it works
The init command uses the init
command from the @umi-digital/cli
package to initialise a new project. This command checks if there is an umirc.json
file in the directory
and if not then creates the file. It then asks the user for values whilst providing defaults.
Note:
It is strongly very strongly suggested that you just choose these defaults.
Your configuration file should look like this (however as this project is under constant development, the exact structure may change):
{
"name": "test",
"aliases": {
"components": "components",
"utils": "utils",
"hooks": "hooks",
"api": "api",
"ui": "ui"
}
}