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
3 # found in the LICENSE file.
7 'CLOSURE_DIR': '<(DEPTH)/third_party/closure_compiler',
8 'EXTERNS_DIR': '<(CLOSURE_DIR)/externs',
15 # This action optionally takes these arguments:
16 # - source_files: a list of all of the source files to be compiled.
17 # If source_files is not defined, |target_name| will be
18 # used as the single source file.
19 # - out_file: a file where the compiled output is written to. The default
20 # is gen/closure/<path to |target_name|>/|target_name|.js.
21 # - depends: scripts that the source file(s) depends on being included
23 # - externs: files that describe globals used the source file(s).
24 # - script_args: additional arguments to pass to compile.py.
25 # - closure_args: additional arguments to pass to the Closure compiler.
26 # - closure_strictness_args: additional arguments dealing with the
27 # strictness of compilation; Non-strict
28 # defaults are provided that can be overriden.
29 'action_name': 'compile_js',
31 'source_files%': ['<(_target_name).js'],
32 'out_file%': '<(SHARED_INTERMEDIATE_DIR)/closure/<!(python <(CLOSURE_DIR)/build/outputs.py <(_target_name).js)',
36 'disabled_closure_args%': '<(default_disabled_closure_args)',
40 '<(CLOSURE_DIR)/compile.py',
41 '<(CLOSURE_DIR)/processor.py',
42 '<(CLOSURE_DIR)/build/inputs.py',
43 '<(CLOSURE_DIR)/build/outputs.py',
44 '<(CLOSURE_DIR)/compiler/compiler.jar',
45 '<(CLOSURE_DIR)/runner/runner.jar',
46 '<!@(python <(CLOSURE_DIR)/build/inputs.py <@(source_files) -d <@(depends) -e <@(externs))',
53 '<(CLOSURE_DIR)/compile.py',
56 '--depends', '<@(depends)',
57 '--externs', '<@(externs)',
58 '--out-file', '<(out_file)',
59 '--closure-args', '<@(closure_args)', '<@(disabled_closure_args)',
60 # Add '--verbose' for make glorious log spam of Closure compiler.
62 'message': 'Compiling <(_target_name)',