The new
command provides the --config parameter, which is used to specify the answers to interactive questions in advance during the execution process.
Here, we will introduce the fields and field values that can be configured in the config
under different scenario.
Question: Please select the operation you wants.
Options:
Create project element -- element
Enable features -- function
Automatic refactors -- refactor
Question: Please select the type of element to create.
Options:
New "entry" -- entry
New "Custom Web Server" source code directory -- server
Question: Please fill in the entry name.
This configuration is required when creating a new application entry, and the configuration value is a string.
Question: Please select the feature name.
Options:
Enable Rspack Build -- rspack
Enable Tailwind CSS -- tailwindcss
Enable BFF -- bff
Enable SSG -- ssg
Enable SWC Compile -- swc
Enable Micro Frontend -- micro_frontend
Enable UA-based Polyfill Feature -- polyfill
Enable Global Proxy -- proxy
Question: Please select the BFF type
Options:
Function -- func
Framework -- framework
This configuration is required when enabling the BFF function.
Question: Please select the framework.
Options:
Express -- express
Koa -- koa
This configuration is required when enabling the BFF function.
Question: Please select the type of refactoring.
Options:
Question: Please select the feature name.
Options:
Enable Tailwind CSS -- tailwindcss
Enable Storybook -- storybook
Enable Runtime API -- runtime_api