diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-05-16 18:12:08 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-05-16 18:22:28 -0700 |
commit | 9da6e1f33581bcb2c139ebcec08c61a5df2b010a (patch) | |
tree | 423e8028cd1d621b1e2dda430e0ec39ab20cb071 /tools/shared.py | |
parent | 4782b382e907c7db873e66b65e2aac26096756b0 (diff) |
support closure compiler on the shell in asm mode
Diffstat (limited to 'tools/shared.py')
-rw-r--r-- | tools/shared.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/shared.py b/tools/shared.py index 228f1253..321fa073 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -1208,7 +1208,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' % { 'winfix': '' if not WINDOWS e return js_optimizer.run(filename, passes, listify(NODE_JS), jcache) @staticmethod - def closure_compiler(filename): + def closure_compiler(filename, pretty=True): if not os.path.exists(CLOSURE_COMPILER): raise Exception('Closure compiler appears to be missing, looked at: ' + str(CLOSURE_COMPILER)) @@ -1218,10 +1218,10 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' % { 'winfix': '' if not WINDOWS e '-Xmx' + (os.environ.get('JAVA_HEAP_SIZE') or '1024m'), # if you need a larger Java heap, use this environment variable '-jar', CLOSURE_COMPILER, '--compilation_level', 'ADVANCED_OPTIMIZATIONS', - '--formatting', 'PRETTY_PRINT', '--language_in', 'ECMASCRIPT5', #'--variable_map_output_file', filename + '.vars', '--js', filename, '--js_output_file', filename + '.cc.js'] + if pretty: args += ['--formatting', 'PRETTY_PRINT'] if os.environ.get('EMCC_CLOSURE_ARGS'): args += shlex.split(os.environ.get('EMCC_CLOSURE_ARGS')) process = Popen(args, stdout=PIPE, stderr=STDOUT) |