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 # This file should be identical to js_compile.gypi except it passes jscomp_error
6 # flags to the compiler. One should prefer this over js_compile.gypi once the
7 # JS code being compiled are error free.
9 # This file should be eventually deprecated in favor of
10 # third_party/closure_compiler/compile_js.gypi once they have the same set of
11 # jscomp_error flags enabled. See http://crbug.com/487804
14 'closure_compiler_path': '<(DEPTH)/third_party/closure_compiler/compiler/compiler.jar',
15 'compile_javascript%': 1,
18 ['compile_javascript==1', {
21 'rule_name': 'jscompilation',
24 '<(closure_compiler_path)',
27 '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_NAME)',
32 '<(closure_compiler_path)',
33 '--compilation_level',
34 'SIMPLE_OPTIMIZATIONS',
35 '--jscomp_error=accessControls',
36 '--jscomp_error=ambiguousFunctionDecl',
37 '--jscomp_error=checkStructDictInheritance',
38 # '--jscomp_error=checkTypes',
39 # '--jscomp_error=checkVars',
40 '--jscomp_error=constantProperty',
41 '--jscomp_error=deprecated',
42 '--jscomp_error=externsValidation',
43 '--jscomp_error=globalThis',
44 '--jscomp_error=invalidCasts',
45 # '--jscomp_error=missingProperties',
46 # '--jscomp_error=missingReturn',
47 '--jscomp_error=nonStandardJsDocs',
48 '--jscomp_error=suspiciousCode',
49 '--jscomp_error=undefinedNames',
50 # '--jscomp_error=undefinedVars',
51 '--jscomp_error=unknownDefines',
52 '--jscomp_error=uselessCode',
53 '--jscomp_error=visibility',
59 'message': 'Running closure compiler on <(RULE_INPUT_NAME)',
60 } # rule_name: jscompilation
65 'rule_name': 'jscompilation',
68 '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_NAME)',
76 ]} # rule_name: jscompilation
77 ] # condition: compile_javascript