| Index: ios/web/js_compile.gypi
|
| diff --git a/ios/web/js_compile.gypi b/ios/web/js_compile.gypi
|
| index b5212b5357b32344e05e2c6772a8827a76463ce8..df195544151809a8c03250bbf5bc347c954998b8 100644
|
| --- a/ios/web/js_compile.gypi
|
| +++ b/ios/web/js_compile.gypi
|
| @@ -3,19 +3,51 @@
|
| # found in the LICENSE file.
|
|
|
| {
|
| - # TODO(ios): Enable javascript compilation. See http://crbug.com/429756
|
| - 'rules': [
|
| - {
|
| - 'rule_name': 'jscompilation',
|
| - 'extension': 'js',
|
| - 'outputs': [
|
| - '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_NAME)',
|
| - ],
|
| - 'action': [
|
| - 'cp',
|
| - '<(RULE_INPUT_PATH)',
|
| - '<@(_outputs)',
|
| - ],
|
| - },
|
| - ], # rule_name: jscompilation
|
| + 'variables': {
|
| + 'closure_compiler_path': '<(DEPTH)/third_party/closure_compiler/compiler/compiler.jar',
|
| + 'compile_javascript%': 1,
|
| + },
|
| + 'conditions': [
|
| + ['compile_javascript==1', {
|
| + 'rules': [
|
| + {
|
| + 'rule_name': 'jscompilation',
|
| + 'extension': 'js',
|
| + 'inputs': [
|
| + '<(closure_compiler_path)',
|
| + ],
|
| + 'outputs': [
|
| + '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_NAME)',
|
| + ],
|
| + 'action': [
|
| + 'java',
|
| + '-jar',
|
| + '<(closure_compiler_path)',
|
| + '--compilation_level',
|
| + 'SIMPLE_OPTIMIZATIONS',
|
| + '--js',
|
| + '<(RULE_INPUT_PATH)',
|
| + '--js_output_file',
|
| + '<@(_outputs)',
|
| + ],
|
| + 'message': 'Running closure compiler on <(RULE_INPUT_NAME)',
|
| + } # rule_name: jscompilation
|
| + ]},
|
| + { # else
|
| + 'rules': [
|
| + {
|
| + 'rule_name': 'jscompilation',
|
| + 'extension': 'js',
|
| + 'outputs': [
|
| + '<(SHARED_INTERMEDIATE_DIR)/<(RULE_INPUT_NAME)',
|
| + ],
|
| + 'action': [
|
| + 'cp',
|
| + '<(RULE_INPUT_PATH)',
|
| + '<@(_outputs)',
|
| + ],
|
| + }
|
| + ]} # rule_name: jscompilation
|
| + ] # condition: compile_javascript
|
| + ] # conditions
|
| }
|
|
|