OLD | NEW |
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 { | 5 { |
6 # TODO(ios): Enable javascript compilation. See http://crbug.com/429756 | 6 'variables': { |
7 'rules': [ | 7 'closure_compiler_path': '<(DEPTH)/third_party/closure_compiler/compiler/com
piler.jar', |
8 { | 8 'compile_javascript%': 1, |
9 'rule_name': 'jscompilation', | 9 }, |
10 'extension': 'js', | 10 'conditions': [ |
11 'outputs': [ | 11 ['compile_javascript==1', { |
12 '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_NAME)', | 12 'rules': [ |
13 ], | 13 { |
14 'action': [ | 14 'rule_name': 'jscompilation', |
15 'cp', | 15 'extension': 'js', |
16 '<(RULE_INPUT_PATH)', | 16 'inputs': [ |
17 '<@(_outputs)', | 17 '<(closure_compiler_path)', |
18 ], | 18 ], |
19 }, | 19 'outputs': [ |
20 ], # rule_name: jscompilation | 20 '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_NAME)', |
| 21 ], |
| 22 'action': [ |
| 23 'java', |
| 24 '-jar', |
| 25 '<(closure_compiler_path)', |
| 26 '--compilation_level', |
| 27 'SIMPLE_OPTIMIZATIONS', |
| 28 '--js', |
| 29 '<(RULE_INPUT_PATH)', |
| 30 '--js_output_file', |
| 31 '<@(_outputs)', |
| 32 ], |
| 33 'message': 'Running closure compiler on <(RULE_INPUT_NAME)', |
| 34 } # rule_name: jscompilation |
| 35 ]}, |
| 36 { # else |
| 37 'rules': [ |
| 38 { |
| 39 'rule_name': 'jscompilation', |
| 40 'extension': 'js', |
| 41 'outputs': [ |
| 42 '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_NAME)', |
| 43 ], |
| 44 'action': [ |
| 45 'cp', |
| 46 '<(RULE_INPUT_PATH)', |
| 47 '<@(_outputs)', |
| 48 ], |
| 49 } |
| 50 ]} # rule_name: jscompilation |
| 51 ] # condition: compile_javascript |
| 52 ] # conditions |
21 } | 53 } |
OLD | NEW |