egret [command]
1、Run a project called HelloWorld
egret run HelloWorld
2、Compile a project called HelloWorld
egret build HelloWorld
Create a new project
egret create project_name [--type core|eui]
keyword | description |
---|---|
project_name |
Project name, named according to the naming conventions of the operating system |
--type |
The project type to be created, either core or eui, has a default value of core |
1、Create an empty project named HelloWorld
egret create HelloWorld
2、 Create a eui project named HelloWorld
egret create HelloWorld --type eui
Create a new third-party library project
egret create_lib lib_name
keyword | description |
---|---|
lib_name |
Third party library name, according to the operating system naming specifications |
Generate app from h5 game
egret create_app app_name -f h5_game_path -t template_path
keyword | description |
---|---|
app_name |
Mobile application project name, according to the operating system naming specifications |
-f |
The path of the h5 project corresponding to the app project |
-t |
Corresponding to the Native Support path |
If you are compiling under a project folder, do not add a project name
Note: the path is best in quotation marks, to prevent the path has a space error
Build the specified project
egret build [project_name] [-e] [--target wxgame|bricks|ios|android]
keyword | description |
---|---|
project_name |
Project name, named according to the naming conventions of the operating system |
-e |
Compiles the engine directory while compiling the specified project |
--target |
编Compile the target version, optional parameters have wxgame :WeChat little game;bricks :play; android :android projects;iOS :iOS projects. |
If the command is executed under the project folder, the project name can be omitted
1、Compile 【HelloWorld】
egret build HelloWorld
2、Compile the【HelloWorld】engine at the same time
egret build HelloWorld -e
3、Compiled WeChat small game project while compiling 【HelloWorld】
egret build HelloWorld --target wxgame
Publish projects
egret publish [project_name] [--version [version]] [--target wxgame|bricks|ios|android]
keyword | description |
---|---|
project_name |
Project name, named according to the naming conventions of the operating system |
--version |
Set the version number after the release, you can not set |
--target |
Compile the target version, optional parameters have wxgame :WeChat little game;bricks :play;android :Android projects;iOS :iOS projects. |
If the command is executed under the project folder, the project name can be omitted
Release 【HelloWorld】 to WeChat mini-game
egret publish HelloWorld --version 0.03 --target wxgame
Start the local server and run the specified project in the default browser
egret run [project_name] [--port 3000]
keyword | description |
---|---|
project_name |
Project name, named according to the naming conventions of the operating system |
--port |
Specify port number |
If the command is executed under the project folder, the project name can be omitted
Run the [HelloWorld] project on the specified port
egret startserver HelloWorld --port 3002
Reset the engine code in the project
egret clean [project_name]
keyword | description |
---|---|
project_name |
Project name, named according to the naming conventions of the operating system |
If the command is executed under the project folder, the project name can be omitted
Upgrade project code
egret upgrade [project_name] --egretversion [target version]
keyword | description |
---|---|
project_name |
Project name, named according to the naming conventions of the operating system |
target version |
The target version number to switch |
If the command is executed under the project folder, the project name can be omitted
Upgrade the current directory to 5.1.0
egret upgrade --egretversion 5.1.0
egret upgrade [project_name]
keyword | description |
---|---|
project_name |
Project name, named according to the naming conventions of the operating system |
If the command is executed under the project folder, the project name can be omitted
Upgrade 【HelloWorld】 porjects
egret upgrade HelloWorld
1. Modify the version number under the field 'egret_version' in the configuration file 'egretProperties. Json 'in the project root directory
2. Implement egret clean and reduce the project to the target version
After modifying the engine source code, compile the engine source code. If there are no special requirements, it is not recommended for ordinary users
egret make
Obtain Egret information, such as the current Egret version, and the installation path
egret info
Learn the details of each command
egret help [command]