Basic Usage
Creating templates is the core feature of Preset CLI, which provides a variety of project templates for you to use.
TIP
The template list is under continuous improvement.
Initialization
You can create a starter templates to your liking by init
(alias i
) command.
preset init
Specify a project name
You can add a parameter as the project name, then you will skip the problem of entering the project name and choose the technology stack directly:
preset init hello-vue
Specify a project template
You can directly specify a template to create a project with the --template
option (requires v0.12.0
above):
# A project called `hello-vue` will be created using the `vue3-ts-vite` template
preset init hello-vue --template vue3-ts-vite
Fetch latest configuration
Preset CLI supports getting the latest technology stack list and starter template list without updating the version, because they are obtained through configuration files.
The configuration files are hosted in config folder.
Therefore, after executing the init
command, a network request will be initiated to fetch the configuration file.