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 'includes': [ | |
9 'closure_args.gypi', | |
10 ], | |
8 }, | 11 }, |
9 'actions': [ | 12 'actions': [ |
10 { | 13 { |
11 # This action optionally takes these arguments: | 14 # This action optionally takes these arguments: |
12 # - depends: scripts that the source file depends on being included alread y | 15 # - source_files: a list of all of the source files to be compiled. |
13 # - externs: files that describe globals used by |source| | 16 # If source_files is not defined, |target_name| will be |
17 # used as the single source file. | |
18 # - out_file: a file where the compiled output is written to. The default | |
19 # is gen/closure/<path to |target_name|>/|target_name|.js. | |
20 # - depends: scripts that the source file(s) depends on being included alr eady. | |
21 # - externs: files that describe globals used the source file(s). | |
22 # - script_args: additional arguments to pass to compile.py. | |
23 # - closure_args: additional arguments to pass to the Closure compiler. | |
24 # - closure_strictness_args: additional arguments dealing with the strictn ess of compilation; | |
25 # Non-strict defaults are provided that can be overriden. | |
Dan Beam
2015/06/12 21:45:06
nit: 80 col wrap when you can
Theresa
2015/06/12 22:12:15
Done.
| |
14 'action_name': 'compile_js', | 26 'action_name': 'compile_js', |
15 'variables': { | 27 'variables': { |
16 'source_file': '<(_target_name).js', | 28 'source_files%': ['<(_target_name).js'], |
17 'out_file': '<(SHARED_INTERMEDIATE_DIR)/closure/<!(python <(CLOSURE_DIR) /build/outputs.py <@(source_file))', | 29 'out_file%': '<(SHARED_INTERMEDIATE_DIR)/closure/<!(python <(CLOSURE_DIR )/build/outputs.py <(_target_name).js)', |
18 'externs%': [], | 30 'externs%': [], |
19 'depends%': [], | 31 'depends%': [], |
32 'script_args%': [], | |
33 'disabled_closure_args%': [ | |
Dan Beam
2015/06/12 21:45:06
why can't these live in closure_args.gypi?
'dis
Theresa
2015/06/12 22:12:15
They can. Moved.
| |
34 'jscomp_off=duplicate', | |
35 'jscomp_off=misplacedTypeAnnotation', | |
36 ], | |
20 }, | 37 }, |
21 'inputs': [ | 38 'inputs': [ |
22 'compile_js.gypi', | 39 'compile_js.gypi', |
23 '<(CLOSURE_DIR)/compile.py', | 40 '<(CLOSURE_DIR)/compile.py', |
24 '<(CLOSURE_DIR)/processor.py', | 41 '<(CLOSURE_DIR)/processor.py', |
25 '<(CLOSURE_DIR)/build/inputs.py', | 42 '<(CLOSURE_DIR)/build/inputs.py', |
26 '<(CLOSURE_DIR)/build/outputs.py', | 43 '<(CLOSURE_DIR)/build/outputs.py', |
27 '<(CLOSURE_DIR)/compiler/compiler.jar', | 44 '<(CLOSURE_DIR)/compiler/compiler.jar', |
28 '<(CLOSURE_DIR)/runner/runner.jar', | 45 '<(CLOSURE_DIR)/runner/runner.jar', |
29 '<!@(python <(CLOSURE_DIR)/build/inputs.py <(source_file) -d <@(depends) -e <@(externs))', | 46 '<!@(python <(CLOSURE_DIR)/build/inputs.py <@(source_files) -d <@(depend s) -e <@(externs))', |
30 ], | 47 ], |
31 'outputs': [ | 48 'outputs': [ |
32 '<(out_file)', | 49 '<(out_file)', |
33 ], | 50 ], |
34 'action': [ | 51 'action': [ |
35 'python', | 52 'python', |
36 '<(CLOSURE_DIR)/compile.py', | 53 '<(CLOSURE_DIR)/compile.py', |
37 '<(source_file)', | 54 '<@(source_files)', |
55 '<@(script_args)', | |
38 '--depends', '<@(depends)', | 56 '--depends', '<@(depends)', |
39 '--externs', '<@(externs)', | 57 '--externs', '<@(externs)', |
40 '--out_file', '<(out_file)', | 58 '--out-file', '<(out_file)', |
59 '--closure-args', '<@(closure_args)', '<@(disabled_closure_args)', | |
41 # Add '--verbose' for make glorious log spam of Closure compiler. | 60 # Add '--verbose' for make glorious log spam of Closure compiler. |
42 ], | 61 ], |
43 'message': 'Compiling <(source_file)', | 62 'message': 'Compiling <(_target_name)', |
44 } | 63 } |
45 ], | 64 ], |
46 } | 65 } |
OLD | NEW |