Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / third_party / closure_compiler / compile_js2.gypi
blob191be654439881111ca822675a38f75a40b2ccfe
1 # Copyright 2015 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.
5   'type': 'none',
7   'variables': {
8     'CLOSURE_DIR': '<(DEPTH)/third_party/closure_compiler',
9     'EXTERNS_GYP': '<(CLOSURE_DIR)/externs/compiled_resources.gyp',
11     'default_source_file': '<(_target_name).js',
12     'source_files%': ['<(default_source_file)'],
14     'includes': ['closure_args.gypi'],
15   },
17   'sources': ['<@(source_files)'],
19   'all_dependent_settings': {
20     'sources': ['<@(source_files)'],
21   },
23   'actions': [
24     {
25       'action_name': 'compile_js',
27       # This action optionally takes these arguments:
28       # - sources: a list of all of the source files to be compiled.
29       #            If sources is undefined, a default of ['<(_target_name).js']
30       #            is created (this probably suffices for many targets).
31       # - out_file: a file where the compiled output is written to. The default
32       #             is gen/closure/<path to |target_name|>/|target_name|.js.
33       # - script_args: additional arguments to pass to compile.py.
34       # - closure_args: additional arguments to pass to the Closure compiler.
35       # - disabled_closure_args: additional arguments dealing with the
36       #                          strictness of compilation; Non-strict
37       #                          defaults are provided that can be overriden.
38       'variables': {
39         'target_path': '<!(python <(CLOSURE_DIR)/build/outputs.py <(default_source_file))',
40         'out_file%': '<(SHARED_INTERMEDIATE_DIR)/closure/<(target_path)',
41         # TODO(dbeam): add --custom_sources when 'source_files' is set?
42         'script_args%': [],
43         'disabled_closure_args%': '<(default_disabled_closure_args)',
44       },
46       'inputs': [
47         '<(CLOSURE_DIR)/compile_js2.gypi',
48         '<(CLOSURE_DIR)/compile2.py',
49         '<(CLOSURE_DIR)/externs_js.gypi',
50         '<(CLOSURE_DIR)/processor.py',
51         '<(CLOSURE_DIR)/build/outputs.py',
52         '<(CLOSURE_DIR)/compiler/compiler.jar',
53         '<(CLOSURE_DIR)/runner/runner.jar',
54         '>@(_sources)',
55       ],
57       'outputs': ['<(out_file)'],
59       'action': [
60         'python',
61         '<(CLOSURE_DIR)/compile2.py',
62         '<@(script_args)',
63         '>@(_sources)',
64         '--out_file', '<(out_file)',
65         '--closure_args', '<@(closure_args)', '<@(disabled_closure_args)',
66         # '--verbose' # for make glorious log spam of Closure compiler.
67       ],
69       'message': 'Compiling <(target_path)',
70     },
71   ],