All Products
Search
Document Center

Mobile Platform as a Service:Project Management

Last Updated:Apr 24, 2023

This topic describes the configurations of Ant Cube Card.

Project directory structure

A valid card project consists of a configuration file .act.config.json located under the project root directory and a set of card description file .vue, .css, .json, etc. The directory structure is as follows:

.
├── dist // The compilation result folder (automatically generated when you perform the compilation operation)
│ ├── app.manifest // The application configuration information (the naming format is fixed)
│ ├── test_cube        
| | ├── main.bin // The binary file of the compiled product.
| | ├── main.json // The JSON file that is compiled.
| | ├── main.mock // The compilation product of mock.json
| | ├── main.js // The JS logic segment of the compiled product, which facilitates run time troubleshooting of JS segment exceptions.
| | └ ── main.zip // The overall package file for all products of the card.
├── test_cube
│ ├── main.vue // [Required] card source code file, file name cannot be changed
│ ├── mock.json // [Optional] Card mock data
│ ├── manifest.json // [Required] The card compilation configuration file. The file name cannot be changed.
| └ ── main.css // [Optional] card style file
└ ── .act.config.json // [Required] project configuration file, file name cannot be changed 

.act.config.json

The .act.config.json is the configuration file of the card project. It is currently generated by the Ant Cube Card CLI tool and it does not need to be modified or concerned.

Note

The .act.config.json must be under the root directory of the Works.

//.act.config.json

{
  "type": "templates", // Required. The project type. Valid values: templates.
}

manifest.json

The manifest.json is the compiled configuration file of the corresponding card. It is currently generated by the Ant Cube Card CLI tool and does not need to be modified or concerned.

Note

The manifest.json must be under the same path as the corresponding card main.vue.

//        manifest.json
{
  "name": "my-card", // Optional. The card name. After the card is published, the card ID prevails. 
  "version": "x.x.x", // Optional. The card version. After the card is published, the background version of the card prevails. 
  "compilerType": 1, // Optional. The card compilation mode. 0 (static card) | 1 (dynamic card. JS is supported. Recommended). Default value: 0. 
  "jsformat": 1, // Optional. The card JS compilation format. 0 (expression export) | 1(IIFE export. JS import is supported. Recommended). Default value: 0. 
}

Engineering example

test_cube.zip