OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 { | 4 { |
5 'type': 'none', | 5 'type': 'none', |
6 'variables': { | 6 'variables': { |
7 'CLOSURE_DIR': '<(DEPTH)/third_party/closure_compiler', | 7 'CLOSURE_DIR': '<(DEPTH)/third_party/closure_compiler', |
8 }, | 8 }, |
9 'actions': [ | 9 'actions': [ |
10 { | 10 { |
11 # This action optionally takes these arguments: | 11 # This action optionally takes these arguments: |
12 # - depends: scripts that the source file depends on being included alread y | 12 # - depends: scripts that the source file depends on being included alread y |
13 # - externs: files that describe globals used by |source| | 13 # - externs: files that describe globals used by |source| |
14 'action_name': 'compile_js', | 14 'action_name': 'compile_js', |
15 'variables': { | 15 'variables': { |
16 'source_file': '<(_target_name).js', | 16 'source_files': [], |
17 'out_file': '<(SHARED_INTERMEDIATE_DIR)/closure/<!(python <(CLOSURE_DIR) /build/outputs.py <@(source_file))', | 17 'out_file': '<(SHARED_INTERMEDIATE_DIR)/closure/<!(python <(CLOSURE_DIR) /build/outputs.py <@(_target_name).js)', |
18 'externs%': [], | 18 'externs%': [], |
19 'depends%': [], | 19 'depends%': [], |
20 'script_args': [], | |
21 'closure_args': [ | |
22 '--accept_const_keyword', | |
23 '--language_in=ECMASCRIPT5_STRICT', | |
24 '--summary_detail_level=3', # compile.py depends on this for output pa rsing; do not override. | |
25 '--compilation_level=SIMPLE_OPTIMIZATIONS', | |
26 '--source_map_format=V3', | |
27 '--polymer_pass', | |
28 "--jscomp_error=accessControls", | |
Dan Beam
2015/06/01 22:57:39
" -> '
Theresa
2015/06/02 22:02:13
Done.
| |
29 "--jscomp_error=ambiguousFunctionDecl", | |
30 "--jscomp_error=checkStructDictInheritance", | |
31 "--jscomp_error=checkTypes", | |
32 "--jscomp_error=checkVars", | |
33 "--jscomp_error=constantProperty", | |
34 "--jscomp_error=deprecated", | |
35 "--jscomp_error=externsValidation", | |
36 "--jscomp_error=globalThis", | |
37 "--jscomp_error=invalidCasts", | |
38 "--jscomp_error=missingProperties", | |
39 "--jscomp_error=missingReturn", | |
40 "--jscomp_error=nonStandardJsDocs", | |
41 "--jscomp_error=suspiciousCode", | |
42 "--jscomp_error=undefinedNames", | |
43 "--jscomp_error=undefinedVars", | |
44 "--jscomp_error=unknownDefines", | |
45 "--jscomp_error=uselessCode", | |
46 "--jscomp_error=visibility", | |
47 "--extra_annotation_name=attribute", | |
48 "--extra_annotation_name=status", | |
49 "--extra_annotation_name=element", | |
50 "--extra_annotation_name=homepage", | |
51 "--extra_annotation_name=submodule", | |
52 "--extra_annotation_name=group", | |
53 "--jscomp_off=duplicate", | |
54 "--jscomp_off=misplacedTypeAnnotation", | |
Dan Beam
2015/06/01 22:57:40
alphabetize this list
Theresa
2015/06/02 22:02:12
Done.
| |
55 ], | |
20 }, | 56 }, |
21 'inputs': [ | 57 'inputs': [ |
22 'compile_js.gypi', | 58 'compile_js.gypi', |
23 '<(CLOSURE_DIR)/compile.py', | 59 '<(CLOSURE_DIR)/compile.py', |
24 '<(CLOSURE_DIR)/processor.py', | 60 '<(CLOSURE_DIR)/processor.py', |
25 '<(CLOSURE_DIR)/build/inputs.py', | 61 '<(CLOSURE_DIR)/build/inputs.py', |
26 '<(CLOSURE_DIR)/build/outputs.py', | 62 '<(CLOSURE_DIR)/build/outputs.py', |
27 '<(CLOSURE_DIR)/compiler/compiler.jar', | 63 '<(CLOSURE_DIR)/compiler/compiler.jar', |
28 '<(CLOSURE_DIR)/runner/runner.jar', | 64 '<(CLOSURE_DIR)/runner/runner.jar', |
29 '<!@(python <(CLOSURE_DIR)/build/inputs.py <(source_file) -d <@(depends) -e <@(externs))', | 65 '<!@(python <(CLOSURE_DIR)/build/inputs.py <(source_file) -d <@(depends) -e <@(externs))', |
30 ], | 66 ], |
31 'outputs': [ | 67 'outputs': [ |
32 '<(out_file)', | 68 '<(out_file)', |
33 ], | 69 ], |
34 'action': [ | 70 'action': [ |
35 'python', | 71 'python', |
36 '<(CLOSURE_DIR)/compile.py', | 72 '<(CLOSURE_DIR)/compile.py', |
37 '<(source_file)', | 73 '<(source_files)', |
Dan Beam
2015/06/01 22:57:39
where does <(_target_name).js actually get sent to
Theresa
2015/06/01 23:46:55
I decoupled _target_name and source_files, because
Dan Beam
2015/06/02 01:02:33
'source_files%': ['<(_target_name.js)'],
https://
| |
74 '<@(script_args)', | |
38 '--depends', '<@(depends)', | 75 '--depends', '<@(depends)', |
39 '--externs', '<@(externs)', | 76 '--externs', '<@(externs)', |
40 '--out_file', '<(out_file)', | 77 '--out_file', '<(out_file)', |
78 '<@(closure_args)', | |
Dan Beam
2015/06/01 22:57:40
hmmmm, shouldn't this have a -c or --closure(_-)ar
Theresa
2015/06/01 23:46:55
Yes, I think it does.
| |
41 # Add '--verbose' for make glorious log spam of Closure compiler. | 79 # Add '--verbose' for make glorious log spam of Closure compiler. |
42 ], | 80 ], |
43 'message': 'Compiling <(source_file)', | 81 'message': 'Compiling <(source_file)', |
44 } | 82 } |
45 ], | 83 ], |
46 } | 84 } |
OLD | NEW |