cocos2d/cocos2d-x — pull request #2245 by walzer (2013-03-22 04:19:29+00:00)
Title: Obfuscated js sources can run on JSB correctly now

1. remove "require" in scripting/javascript/bindings/js/ files, unify to jsb.js
2. add obfuscate.xml into TestJavascript, the usage is: ant -buildfile obfuscate.xml. This step will regenerate TestJavascript/game.js
3. Add a target called "TestJavascriptObfuscated" into TestJavascript.xcodeproj. "remove game.js && ant -buildfile obfuscate.xml" was written into a build phase in this target. As the result, in each time you build and run TestJavascriptObfuscated, all js source in cocos2d-js-tests will be obfuscated into game.js, which is the only js file in obfuscated target.

I have only modified the iOS project. Other platforms can do the same.

NOTE: to run the target TestJavascriptObfuscated correctly, these jobs should be done:
1. merge my pull request in cocos2d-js-tests repo https://github.com/cocos2d/cocos2d-js-tests/pull/140
2. move the samples/Javascript/cocos2d-js-test submodule's ref to the merged reference in step 1.