Skip to content

Conversation

@dumganhar
Copy link

Usage:

Usage: jscompile.py -s src_dir -d dst_dir [-c -o COMPRESSED_FILENAME -j COMPILER_CONFIG]

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, supports mutiple source directory
  -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 by using JSON, please refer to compiler_config_sample.json

Example:

Using closure-compiler

./jscompile.py -d output_dir -s cocos2dx_root/scripting/javascript/bindings/js -s cocos2dx_root/samples/Javascript/Shared/tests -o game.min.js -j compiler_config_sample.json -c

Not using closure-comipler

./jscompile.py -d output_dir -scocos2dx_root/scripting/javascript/bindings/js -s cocos2dx_root/samples/Javascript/Shared/tests

@dumganhar
Copy link
Author

@ricardoquesada
Please review and give me your feedback. Thanks.

ricardoquesada added a commit that referenced this pull request May 16, 2013
Adding support for generating js bytecode with closure-compiler.
@ricardoquesada ricardoquesada merged commit 90ffe63 into cocos2d:develop May 16, 2013
@ricardoquesada
Copy link
Contributor

Thanks. Merged. I modified it a little bit. It is now integrated with the cocos2d.py file.

@dumganhar dumganhar deleted the jscompiler branch May 18, 2013 12:24
minggo pushed a commit that referenced this pull request Feb 19, 2014
remove CCActionEaseEx and CCTweenFunction from cocostudio
ricardoquesada added a commit that referenced this pull request May 14, 2014
Adding support for generating js bytecode with closure-compiler.

Former-commit-id: 90ffe63
natural-law pushed a commit that referenced this pull request May 15, 2014
remove CCActionEaseEx and CCTweenFunction from cocostudio

Former-commit-id: f8deda3
natural-law pushed a commit to natural-law/cocos2d-console that referenced this pull request Mar 28, 2016
Add --env parameter for specify environment variables.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants