cocos2d / cocos2d-js__old__

cocos2d in JavaScript central repository
14 stars 9 forks source link

Adding support for generating js bytecode with closure-compiler. #81

Closed dumganhar closed 11 years ago

dumganhar commented 11 years ago

Usage:

Options:
  -h, --help            show this help message and exit
  -s SRC_DIR_ARR, --src=SRC_DIR_ARR
                        source directory of js files needed to be compiled
  -d DST_DIR, --dst=DST_DIR
                        destination directory of js bytecode files to be
                        stored
  -c, --use_closure_compiler
                        Whether to use closure compiler to compress all js
                        files into just a big file
  -o COMPRESSED_FILENAME, --output_compressed_filename=COMPRESSED_FILENAME
                        Only available when '-c' option was True
  -j COMPILER_CONFIG, --compiler_config=COMPILER_CONFIG
                        The configuration for closure compiler

Example:

/jscompile.py -d output4 -s /Users/james/Project/cocos2d-x/scripting/javascript/bindings/js -s /Users/james/Project/cocos2d-x/samples/Javascript/Shared/tests -o main.js -j compiler-config.json -c
ricardoquesada commented 11 years ago

Thanks. Could you send me this pull request to the cocos2d-console project. https://github.com/cocos2d/cocos2d-console

dumganhar commented 11 years ago

Sure, I'll send it to cocos2d-console.