How to compile without minifiying?

thoughts?

currently it comes with the minified version namely Cocos2d-html5-v2.2.2.min.js

Hi Grady,

I don’t understand what your question is? Could you please give us more information?

Our samples have a build.xml that it has two targets “compile_test” and “compile_test_advanced”, it at /samples/tests/build.xml

Bests
David

Hi David,
Soo, right now if I go to the cocos2d folder, and execute ant build… it will generate this:

Gradys-iMac:lib glaksmono$ ls -l
total 2464
-rw-r--r--+ 1 glaksmono  staff  1259913 Jan 17 12:13 Cocos2d-html5-v2.2.2.min.js
Gradys-iMac:lib glaksmono$ pwd
/Users/glaksmono/Documents/cocos2d-html5/lib

I’m wondering on how to build without creating the “minified” version of the cocos2d?

— Grady

What releasing depends on the definition of build.xml file.
The target file of /root/cocos2d/build.xml is minify engine, and the target file of /root/template/build.xml is a minify game which includes engine files and user logic.

Could you please show us more details about the target file of your compiling?

More information about the compilation levels of closure are available here:

https://developers.google.com/closure/compiler/docs/compilation_levels

In cocos2d-html5 the jscomp task is being used which has a little more information here:

http://code.google.com/p/closure-compiler/wiki/BuildingWithAnt

Generally closure always “minifies”. It is the degree of minification.

The default is simple and it does do some variable replacement. The lightest treatment would probably be to do whitespace only and do a pretty print (you can get it to do this in Chrome as well in the debug tool).

So your comp task might look like

<jscomp compilationLevel="whitespace" prettyprint="true" warning="quiet" debug="false" output="../lib/Cocos2d-html5-v2.2.2.min.js">

Doing so would be good for debugging but terrible for performance and download size (you should be using advanced for that which is not in the build.xml by default but I can confirm that cocos works just fine if you go to that level of compilation.