| Index: third_party/closure_compiler/compile_js.gypi
|
| diff --git a/third_party/closure_compiler/compile_js.gypi b/third_party/closure_compiler/compile_js.gypi
|
| index b97b2acffdc65f7ecb72199eeb74dc49124c5d1c..76edefc88aa888b6bb60cab8899ffe07c3320558 100644
|
| --- a/third_party/closure_compiler/compile_js.gypi
|
| +++ b/third_party/closure_compiler/compile_js.gypi
|
| @@ -9,14 +9,58 @@
|
| 'actions': [
|
| {
|
| # This action optionally takes these arguments:
|
| - # - depends: scripts that the source file depends on being included already
|
| - # - externs: files that describe globals used by |source|
|
| + # - source_files: a list of all of the source files to be compiled.
|
| + # If source_files is not defined, |target_name| will be
|
| + # used as the single source file.
|
| + # - out_file: a file where the compiled output is written to. The default
|
| + # is gen/closure/<target_name_file_path>/|target_name|.js.
|
| + # - depends: scripts that the source file(s) depends on being included
|
| + # already.
|
| + # - externs: files that describe globals used the sourec file(s).
|
| + # - script_args: additional arguments to pass to compile.py.
|
| + # - closure_args: additional arguments to pass to the Closure compiler.
|
| 'action_name': 'compile_js',
|
| 'variables': {
|
| - 'source_file': '<(_target_name).js',
|
| - 'out_file': '<(SHARED_INTERMEDIATE_DIR)/closure/<!(python <(CLOSURE_DIR)/build/outputs.py <@(source_file))',
|
| + 'source_files%': ['<(_target_name).js'],
|
| + 'out_file%': '<(SHARED_INTERMEDIATE_DIR)/closure/<!(python <(CLOSURE_DIR)/build/outputs.py <(_target_name).js)',
|
| 'externs%': [],
|
| 'depends%': [],
|
| + 'script_args%': [],
|
| + 'closure_args': [
|
| + 'accept_const_keyword',
|
| + 'compilation_level=SIMPLE_OPTIMIZATIONS',
|
| + 'extra_annotation_name=attribute',
|
| + 'extra_annotation_name=element',
|
| + 'extra_annotation_name=group',
|
| + 'extra_annotation_name=homepage',
|
| + 'extra_annotation_name=status',
|
| + 'extra_annotation_name=submodule',
|
| + 'jscomp_error=accessControls',
|
| + 'jscomp_error=ambiguousFunctionDecl',
|
| + 'jscomp_error=checkStructDictInheritance',
|
| + 'jscomp_error=checkTypes',
|
| + 'jscomp_error=checkVars',
|
| + 'jscomp_error=constantProperty',
|
| + 'jscomp_error=deprecated',
|
| + 'jscomp_error=externsValidation',
|
| + 'jscomp_error=globalThis',
|
| + 'jscomp_error=invalidCasts',
|
| + 'jscomp_error=missingProperties',
|
| + 'jscomp_error=missingReturn',
|
| + 'jscomp_error=nonStandardJsDocs',
|
| + 'jscomp_error=suspiciousCode',
|
| + 'jscomp_error=undefinedNames',
|
| + 'jscomp_error=undefinedVars',
|
| + 'jscomp_error=unknownDefines',
|
| + 'jscomp_error=uselessCode',
|
| + 'jscomp_error=visibility',
|
| + 'jscomp_off=duplicate',
|
| + 'jscomp_off=misplacedTypeAnnotation',
|
| + 'language_in=ECMASCRIPT5_STRICT',
|
| + 'polymer_pass',
|
| + 'source_map_format=V3',
|
| + 'summary_detail_level=3', # compile.py depends on this for output parsing; do not override.
|
| + ],
|
| },
|
| 'inputs': [
|
| 'compile_js.gypi',
|
| @@ -26,7 +70,7 @@
|
| '<(CLOSURE_DIR)/build/outputs.py',
|
| '<(CLOSURE_DIR)/compiler/compiler.jar',
|
| '<(CLOSURE_DIR)/runner/runner.jar',
|
| - '<!@(python <(CLOSURE_DIR)/build/inputs.py <(source_file) -d <@(depends) -e <@(externs))',
|
| + '<!@(python <(CLOSURE_DIR)/build/inputs.py <@(source_files) -d <@(depends) -e <@(externs))',
|
| ],
|
| 'outputs': [
|
| '<(out_file)',
|
| @@ -34,13 +78,15 @@
|
| 'action': [
|
| 'python',
|
| '<(CLOSURE_DIR)/compile.py',
|
| - '<(source_file)',
|
| + '<@(source_files)',
|
| + '<@(script_args)',
|
| '--depends', '<@(depends)',
|
| '--externs', '<@(externs)',
|
| - '--out_file', '<(out_file)',
|
| + '--out-file', '<(out_file)',
|
| + '--closure-args', '<@(closure_args)',
|
| # Add '--verbose' for make glorious log spam of Closure compiler.
|
| ],
|
| - 'message': 'Compiling <(source_file)',
|
| + 'message': 'Compiling <(_target_name)',
|
| }
|
| ],
|
| }
|
|
|