10 Star 88 Fork 16

Cocos/cocos-engine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cc.config.schema.json 4.90 KB
一键复制 编辑 原始数据 按行查看 历史
PP_Pro 提交于 2022-06-10 13:35 . support ConstantManager (#11392)
{
"$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"
},
"description": "Construct a type with a set of properties K of type T",
"type": "object"
},
"test": {
"$ref": "#/definitions/Test"
}
},
"required": [
"test",
"overrides",
"isVirtualModule"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"features",
"includes",
"constants"
],
"type": "object"
},
"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"
},
"value": {
"description": "The default value of the constant. It can be a boolean or string. When it's a string type, the value is the result of eval().",
"type": [
"boolean",
"string"
]
}
},
"required": [
"comment",
"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"
},
"description": "Construct a type with a set of properties K of type T",
"type": "object"
}
},
"type": "object"
},
"Test": {
"type": "string"
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/cocos/cocos-engine.git
git@gitee.com:cocos/cocos-engine.git
cocos
cocos-engine
cocos-engine
develop

搜索帮助