Not long before, you can only do this manually, but Cocos2d-JS v3.0a have been released last friday, and you can configure sub modules of engine as you need.
You need to find project.json in your project directory, setup the
module section with the modules you need, all definitions for modules can be found in /frameworks/cocos2d-html5/moduleConfig.json
Detailed documentation about project.json can be found here in Chinese: http://www.cocos2d-x.org/docs/manual/framework/html5/v3.0/project-json/zhAnd information about moduleConfig.json can be found in this documentation: http://www.cocos2d-x.org/docs/manual/framework/html5/v3.0/moduleconfig-json/zh
And about Cocos2d-JS, you can refer to this topic: http://www.cocos2d-x.org/forums/19/topics/48033