Index: third_party/closure_compiler/closure_args.gni |
diff --git a/third_party/closure_compiler/closure_args.gni b/third_party/closure_compiler/closure_args.gni |
index 425165b2c073e6106403de38a57bcc96ee8a7ea6..d6960e99d299f3c26bee40d4ddf5bb3f703c5d63 100644 |
--- a/third_party/closure_compiler/closure_args.gni |
+++ b/third_party/closure_compiler/closure_args.gni |
@@ -3,9 +3,9 @@ |
# found in the LICENSE file. |
# GYP version: third_party/closure_compiler/closure_args.gypi |
-default_closure_args = [ |
- "compilation_level=SIMPLE_OPTIMIZATIONS", |
+# Args for all uses of the closure compiler |
+common_closure_args = [ |
"extra_annotation_name=attribute", |
"extra_annotation_name=demo", |
"extra_annotation_name=element", |
@@ -15,6 +15,13 @@ default_closure_args = [ |
"extra_annotation_name=status", |
"extra_annotation_name=submodule", |
+ "source_map_format=V3", |
+] |
+ |
+# Additional closure args for performing full checks. |
+checking_closure_args = [ |
+ "compilation_level=SIMPLE_OPTIMIZATIONS", |
+ |
"jscomp_error=accessControls", |
"jscomp_error=ambiguousFunctionDecl", |
"jscomp_error=checkTypes", |
@@ -38,10 +45,19 @@ default_closure_args = [ |
"language_out=ECMASCRIPT5_STRICT", |
"polymer_pass", |
+] |
- "source_map_format=V3", |
+# Additional closure arguments for minifying |
+minifying_closure_args = [ |
+ "compilation_level=WHITESPACE_ONLY", |
+ |
+ "language_in=ECMASCRIPT6", |
+ "language_out=ECMASCRIPT6", |
] |
+# For compatibility with old uses. |
+default_closure_args = common_closure_args + checking_closure_args |
+ |
default_disabled_closure_args = [ |
"jscomp_off=duplicate", |
"jscomp_off=misplacedTypeAnnotation", |