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

Unified Diff: components/resources/enhanced_bookmarks/enhanced_bookmarks.gypi

Issue 1152583011: Refactor compile_js.gypi to support script_args and closure_args (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: app_remoting_webapp gyp stuff Created 5 years, 6 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
Index: components/resources/enhanced_bookmarks/enhanced_bookmarks.gypi
diff --git a/components/resources/enhanced_bookmarks/enhanced_bookmarks.gypi b/components/resources/enhanced_bookmarks/enhanced_bookmarks.gypi
index f9dcb673cb1f57321d490b2f91857fa551538092..9e0bfc7cc65370750e2c878238f630821dfb9793 100644
--- a/components/resources/enhanced_bookmarks/enhanced_bookmarks.gypi
+++ b/components/resources/enhanced_bookmarks/enhanced_bookmarks.gypi
@@ -2,87 +2,35 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
- 'targets' :[
+ 'targets': [
{
- 'target_name': 'document_image_extractor',
- 'type': 'none',
- 'variables': { 'CLOSURE_DIR': '<(DEPTH)/third_party/closure_compiler', },
- 'actions': [
- {
- # This action optionally takes these arguments:
- # - depends: scripts that the source file depends on being included already
- # - externs: files that describe globals used by |source|
- 'action_name': 'Compile enhanced bookmarks image extractor JavaScript',
- 'variables': {
- 'source_file': 'get_salient_image_url.js',
- 'out_file': '<(SHARED_INTERMEDIATE_DIR)/closure/<!(python <(CLOSURE_DIR)/build/outputs.py <@(source_file))',
- },
- 'inputs': [
- '<(CLOSURE_DIR)/compile.py',
- '<(CLOSURE_DIR)/processor.py',
- '<(CLOSURE_DIR)/build/inputs.py',
- '<(CLOSURE_DIR)/build/outputs.py',
- '<(CLOSURE_DIR)/compiler/compiler.jar',
- '<(CLOSURE_DIR)/runner/runner.jar',
- '<!@(python <(CLOSURE_DIR)/build/inputs.py <(source_file))',
- ],
- 'outputs': [
- '<(out_file)',
- ],
- 'action': [
- 'python',
- '<(CLOSURE_DIR)/compile.py',
- '<@(document_image_extractor_js_files)',
- '<(source_file)',
- '--out_file', '<(out_file)',
- '--no-single-file',
- '--output_wrapper', '(function(){%output% return GetSalientImageUrl();})();',
- ],
- }
- ],
+ 'target_name': 'get_salient_image_url',
+ 'variables': {
+ 'source_files': [
+ 'get_salient_image_url.js',
+ '<@(document_image_extractor_js_files)',
+ ],
+ 'script_args': ['--no-single-file'],
Dan Beam 2015/06/12 21:45:06 it'd be preferable to just detect this via len(opt
Theresa 2015/06/12 22:12:14 I added a TODO for myself note in compile.py.
+ 'closure_args': ['output_wrapper=\'(function(){%output% return GetSalientImageUrl();})();\''],
+ },
'includes': [
- '../../../third_party/document_image_extractor/document_image_extractor_files.gypi'
+ '../../../third_party/document_image_extractor/document_image_extractor_files.gypi',
+ '../../../third_party/closure_compiler/compile_js.gypi',
],
},
{
'target_name': 'dom_initializer',
- 'type': 'none',
- 'variables': { 'CLOSURE_DIR': '<(DEPTH)/third_party/closure_compiler', },
- 'actions': [
- {
- # This action optionally takes these arguments:
- # - depends: scripts that the source file depends on being included already
- # - externs: files that describe globals used by |source|
- 'action_name': 'Compile enhanced bookmarks dom initializer JavaScript',
- 'variables': {
- 'source_file': 'dom_initializer.js',
- 'out_file': '<(SHARED_INTERMEDIATE_DIR)/closure/<!(python <(CLOSURE_DIR)/build/outputs.py <@(source_file))',
- },
- 'inputs': [
- '<(CLOSURE_DIR)/compile.py',
- '<(CLOSURE_DIR)/processor.py',
- '<(CLOSURE_DIR)/build/inputs.py',
- '<(CLOSURE_DIR)/build/outputs.py',
- '<(CLOSURE_DIR)/compiler/compiler.jar',
- '<(CLOSURE_DIR)/runner/runner.jar',
- '<!@(python <(CLOSURE_DIR)/build/inputs.py <(source_file))',
- ],
- 'outputs': [
- '<(out_file)',
- ],
- 'action': [
- 'python',
- '<(CLOSURE_DIR)/compile.py',
- '<@(dom_controller_js_files)',
- '<(source_file)',
- '--out_file', '<(out_file)',
- '--no-single-file',
- '--output_wrapper', '(function(){%output%})();',
- ]
- }
- ],
+ 'variables': {
+ 'source_files': [
+ 'dom_initializer.js',
+ '<@(dom_controller_js_files)',
+ ],
+ 'script_args': ['--no-single-file'],
+ 'closure_args': ['output_wrapper=\'(function(){%output%})();\''],
+ },
'includes': [
- '../../../third_party/document_image_extractor/dom_controller_files.gypi'
+ '../../../third_party/document_image_extractor/dom_controller_files.gypi',
+ '../../../third_party/closure_compiler/compile_js.gypi',
],
},
],

Powered by Google App Engine
This is Rietveld 408576698