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

Unified 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: app_remoting_webapp gyp stuff Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/closure_compiler/compile_js.gypi
diff --git a/third_party/closure_compiler/compile_js.gypi b/third_party/closure_compiler/compile_js.gypi
index b97b2acffdc65f7ecb72199eeb74dc49124c5d1c..4a7d286c05a8e0b48a33d13dfb446a0c365456ce 100644
--- a/third_party/closure_compiler/compile_js.gypi
+++ b/third_party/closure_compiler/compile_js.gypi
@@ -5,18 +5,35 @@
'type': 'none',
'variables': {
'CLOSURE_DIR': '<(DEPTH)/third_party/closure_compiler',
+ 'includes': [
+ 'closure_args.gypi',
+ ],
},
'actions': [
{
# This action optionally takes these arguments:
- # - depends: scripts that the source file depends on being included already
- # - externs: files that describe globals used by |source|
+ # - source_files: a list of all of the source files to be compiled.
+ # If source_files is not defined, |target_name| will be
+ # used as the single source file.
+ # - out_file: a file where the compiled output is written to. The default
+ # is gen/closure/<path to |target_name|>/|target_name|.js.
+ # - depends: scripts that the source file(s) depends on being included already.
+ # - externs: files that describe globals used the source file(s).
+ # - script_args: additional arguments to pass to compile.py.
+ # - closure_args: additional arguments to pass to the Closure compiler.
+ # - closure_strictness_args: additional arguments dealing with the strictness of compilation;
+ # 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.
'action_name': 'compile_js',
'variables': {
- 'source_file': '<(_target_name).js',
- 'out_file': '<(SHARED_INTERMEDIATE_DIR)/closure/<!(python <(CLOSURE_DIR)/build/outputs.py <@(source_file))',
+ 'source_files%': ['<(_target_name).js'],
+ 'out_file%': '<(SHARED_INTERMEDIATE_DIR)/closure/<!(python <(CLOSURE_DIR)/build/outputs.py <(_target_name).js)',
'externs%': [],
'depends%': [],
+ 'script_args%': [],
+ '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.
+ 'jscomp_off=duplicate',
+ 'jscomp_off=misplacedTypeAnnotation',
+ ],
},
'inputs': [
'compile_js.gypi',
@@ -26,7 +43,7 @@
'<(CLOSURE_DIR)/build/outputs.py',
'<(CLOSURE_DIR)/compiler/compiler.jar',
'<(CLOSURE_DIR)/runner/runner.jar',
- '<!@(python <(CLOSURE_DIR)/build/inputs.py <(source_file) -d <@(depends) -e <@(externs))',
+ '<!@(python <(CLOSURE_DIR)/build/inputs.py <@(source_files) -d <@(depends) -e <@(externs))',
],
'outputs': [
'<(out_file)',
@@ -34,13 +51,15 @@
'action': [
'python',
'<(CLOSURE_DIR)/compile.py',
- '<(source_file)',
+ '<@(source_files)',
+ '<@(script_args)',
'--depends', '<@(depends)',
'--externs', '<@(externs)',
- '--out_file', '<(out_file)',
+ '--out-file', '<(out_file)',
+ '--closure-args', '<@(closure_args)', '<@(disabled_closure_args)',
# Add '--verbose' for make glorious log spam of Closure compiler.
],
- 'message': 'Compiling <(source_file)',
+ 'message': 'Compiling <(_target_name)',
}
],
}

Powered by Google App Engine
This is Rietveld 408576698