Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: third_party/closure_compiler/compile_js.gypi

Issue 1152583011: Refactor compile_js.gypi to support script_args and closure_args (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yet another rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 'EXTERNS_DIR': '<(CLOSURE_DIR)/externs', 8 'EXTERNS_DIR': '<(CLOSURE_DIR)/externs',
9 'includes': [
10 'closure_args.gypi',
11 ],
9 }, 12 },
10 'actions': [ 13 'actions': [
11 { 14 {
12 # This action optionally takes these arguments: 15 # This action optionally takes these arguments:
13 # - depends: scripts that the source file depends on being included alread y 16 # - source_files: a list of all of the source files to be compiled.
14 # - externs: files that describe globals used by |source| 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
22 # already.
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.
15 'action_name': 'compile_js', 29 'action_name': 'compile_js',
16 'variables': { 30 'variables': {
17 'source_file': '<(_target_name).js', 31 'source_files%': ['<(_target_name).js'],
18 'out_file': '<(SHARED_INTERMEDIATE_DIR)/closure/<!(python <(CLOSURE_DIR) /build/outputs.py <@(source_file))', 32 'out_file%': '<(SHARED_INTERMEDIATE_DIR)/closure/<!(python <(CLOSURE_DIR )/build/outputs.py <(_target_name).js)',
19 'externs%': [], 33 'externs%': [],
20 'depends%': [], 34 'depends%': [],
35 'script_args%': [],
36 'disabled_closure_args%': '<(default_disabled_closure_args)',
21 }, 37 },
22 'inputs': [ 38 'inputs': [
23 'compile_js.gypi', 39 'compile_js.gypi',
24 '<(CLOSURE_DIR)/compile.py', 40 '<(CLOSURE_DIR)/compile.py',
25 '<(CLOSURE_DIR)/processor.py', 41 '<(CLOSURE_DIR)/processor.py',
26 '<(CLOSURE_DIR)/build/inputs.py', 42 '<(CLOSURE_DIR)/build/inputs.py',
27 '<(CLOSURE_DIR)/build/outputs.py', 43 '<(CLOSURE_DIR)/build/outputs.py',
28 '<(CLOSURE_DIR)/compiler/compiler.jar', 44 '<(CLOSURE_DIR)/compiler/compiler.jar',
29 '<(CLOSURE_DIR)/runner/runner.jar', 45 '<(CLOSURE_DIR)/runner/runner.jar',
30 '<!@(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))',
31 ], 47 ],
32 'outputs': [ 48 'outputs': [
33 '<(out_file)', 49 '<(out_file)',
34 ], 50 ],
35 'action': [ 51 'action': [
36 'python', 52 'python',
37 '<(CLOSURE_DIR)/compile.py', 53 '<(CLOSURE_DIR)/compile.py',
38 '<(source_file)', 54 '<@(source_files)',
55 '<@(script_args)',
39 '--depends', '<@(depends)', 56 '--depends', '<@(depends)',
40 '--externs', '<@(externs)', 57 '--externs', '<@(externs)',
41 '--out_file', '<(out_file)', 58 '--out-file', '<(out_file)',
59 '--closure-args', '<@(closure_args)', '<@(disabled_closure_args)',
42 # Add '--verbose' for make glorious log spam of Closure compiler. 60 # Add '--verbose' for make glorious log spam of Closure compiler.
43 ], 61 ],
44 'message': 'Compiling <(source_file)', 62 'message': 'Compiling <(_target_name)',
45 } 63 }
46 ], 64 ],
47 } 65 }
OLDNEW
« no previous file with comments | « third_party/closure_compiler/compile.py ('k') | third_party/closure_compiler/compiled_resources.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698