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

Unified Diff: ios/web/js_compile.gypi

Issue 1049703004: Upstream web js bundle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added compile_javascript variable to js_compile.gypi. Created 5 years, 9 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
« no previous file with comments | « ios/web/ios_web.gyp ('k') | ios/web/js_compile_bundle.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
}
« no previous file with comments | « ios/web/ios_web.gyp ('k') | ios/web/js_compile_bundle.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698