forked from cocos/cocos-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcc.config.schema.json
More file actions
168 lines (168 loc) · 5.05 KB
/
Copy pathcc.config.schema.json
File metadata and controls
168 lines (168 loc) · 5.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
{
"$ref": "#/definitions/Config",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"Config": {
"additionalProperties": false,
"properties": {
"constants": {
"$ref": "#/definitions/IConstantConfig",
"description": "The constants config for engine and user."
},
"features": {
"additionalProperties": {
"$ref": "#/definitions/Feature"
},
"description": "Engine features. Keys are feature IDs.",
"type": "object"
},
"includes": {
"description": "Included files for quick-compiler.",
"items": {
"type": "string"
},
"type": "array"
},
"index": {
"$ref": "#/definitions/IndexConfig",
"description": "Describe how to generate the index module `'cc'`. Currently not used."
},
"moduleOverrides": {
"items": {
"additionalProperties": false,
"properties": {
"isVirtualModule": {
"type": "boolean"
},
"overrides": {
"additionalProperties": {
"type": "string"
},
"type": "object"
},
"test": {
"$ref": "#/definitions/Test"
}
},
"required": [
"test",
"overrides",
"isVirtualModule"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"features",
"includes",
"constants"
],
"type": "object"
},
"ConstantTypeName": {
"enum": [
"boolean",
"number"
],
"type": "string"
},
"Feature": {
"additionalProperties": false,
"description": "An engine feature.",
"properties": {
"intrinsicFlags": {
"additionalProperties": {},
"description": "Flags to set when this feature is enabled.",
"type": "object"
},
"modules": {
"description": "Modules to be included in this feature in their IDs. The ID of a module is its relative path(no extension) under /exports/.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"modules"
],
"type": "object"
},
"IConstantConfig": {
"additionalProperties": {
"$ref": "#/definitions/IConstantInfo"
},
"type": "object"
},
"IConstantInfo": {
"additionalProperties": false,
"properties": {
"ccGlobal": {
"default": false,
"description": "Whether exported to global as a `CC_XXXX` constant. eg. WECHAT is exported to global.CC_WECHAT NOTE: this is a feature of compatibility with Cocos 2.x engine. Default is false.",
"type": "boolean"
},
"comment": {
"description": "The comment of the constant. Which is used to generate the consts.d.ts file.",
"type": "string"
},
"dynamic": {
"default": false,
"description": "Some constant can't specify the value in the Editor, Preview or Test environment, so we need to dynamically judge them in runtime. These values are specified in a helper called `helper-dynamic-constants.ts`. Default is false.",
"type": "boolean"
},
"internal": {
"description": "Whether exported to developer. If true, it's only exported to engine.",
"type": "boolean"
},
"type": {
"$ref": "#/definitions/ConstantTypeName",
"description": "The type of the constant for generating consts.d.ts file."
},
"value": {
"description": "The default value of the constant. It can be a boolean, number or string. When it's a string type, the value is the result of eval().",
"type": [
"boolean",
"string",
"number"
]
}
},
"required": [
"comment",
"type",
"value",
"internal"
],
"type": "object"
},
"IndexConfig": {
"additionalProperties": false,
"properties": {
"modules": {
"additionalProperties": {
"additionalProperties": false,
"properties": {
"deprecated": {
"description": "If `true`, accesses the exports of this module from `'cc'` will be marked as deprecated.",
"type": "boolean"
},
"ns": {
"description": "If specified, export contents of the module into a namespace specified by `ns` and then export that namespace into `'cc'`. If not specified, contents of the module will be directly exported into `'cc'`.",
"type": "string"
}
},
"type": "object"
},
"type": "object"
}
},
"type": "object"
},
"Test": {
"type": "string"
}
}
}