Create a new project
Use the act init command to create a new project.
Configuration fields, such as name, are used for file and folder names. These names can contain only letters, numbers, underscores, and hyphens.
➜ ~ act init -h
Usage: act init [options]
Initialize a Cube application in the current directory
Options:
-h, --help display help for commandCompile a project
Use the act build command to compile the Cube project in the specified directory.
The path parameter specifies the directory of the Cube project to compile. The options parameter specifies compilation configurations, such as enabling debug mode.
➜ ~ act build -h
Usage: @antdigital/cube build [options] [path]
Compile the Cube project in the specified path. The current path is used if a path is not specified.
Options:
--batch Enable batch processing mode. Supported only for Card 1.0 projects. (default: false)
--watch Enable real-time compilation. Not supported in batch processing mode. (default: false)
--debug Enable debug mode. (default: false)
--bytecode Enable JS bytecode. (default: false)
--bizcode [bizcode] The line-of-business to which the project belongs. (default: "")
--page-id [id] The ID of a single page.
--page-sign Securely sign the build artifact. (default: false)
-h, --help Display help information.Compile dynamic assets
Use the act build-asset command to compile the Cube assets in the specified directory.
The path parameter specifies the project directory that contains the dynamic assets to compile.
➜ ~ act build-asset -h
Usage: @antdigital/cube build-asset [path]
Compile dynamic assets
Options:
--only <step> Build assets step by step. Steps: prepare | build | revert
-h, --help Display help information.