[Cocos2d-js official documentation] 20, moduleConfig. json, cocos2djson
Overview
This configuration file is equivalentJsloader. js
. The purpose of the transformation is to make the configuration pure and support it well.Cocos-console
,Cocos-utils
It is even a user-defined script tool.
Field description module
Configure the js list of each module. The key name is the module name. These keys will be stored inProject. json
OfModules
Field. If you do not knowProject. json
Which modules can be configured in the file, you can directly view the file.
The configuration object of each module is an array. There are two types of array items: Module name and js path.
For example:
"Menus": ["core", "actions", "cocos2d/menus/CCMenuItem. js", "cocos2d/menus/CCMenu. js"]
This configuration means that,Menus
The module depends onCore
AndActions
Module, includingCocos2d/menus/CCMenuItem. js
AndCocos2d/menus/CCMenu. js
.
Reprinted from: http://www.cocos2dx.net/post/245