Common Taro CLI commands.
Taro provides commands to check the version of Taro environment and dependencies with one click, so that you can check the environment and dependencies of your project and troubleshoot environment problems. When raising an issue, please include the information printed in
taro info to help developers locate the problem quickly.
Taro Doctor acts like a doctor who can diagnose the project's dependencies, settings, structure, and the specification of the code for problems and try to give solutions.
But unlike a real doctor, Taro Doctor doesn't need to wait in line to register and doesn't cost anything. You just need to run the command:
taro doctor in the terminal, as in the picture.
Taro create --name [page name] can quickly generate new page files in the current project's pages directory and populate the base code, making it a great tool for improving development efficiency.
Taro creates a .taro folder in the user's root directory, where .taro/index.json is used to store CLI-related configuration.
Developers can use the
taro config command to perform a number of operations on configuration items.