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

Unified Diff: tools/polymer/generate_compiled_resources_gyp.py

Issue 2878483003: Polymer/Closure: fix bug in script that generates Closure GYP (Closed)
Patch Set: Created 3 years, 7 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 | « third_party/polymer/v1_0/generate_gyp.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/polymer/generate_compiled_resources_gyp.py
diff --git a/tools/polymer/generate_compiled_resources_gyp.py b/tools/polymer/generate_compiled_resources_gyp.py
index d825b171a6f9f1c93f715bfe0e9c7739ad496fef..2aa86a21dd1cf8d556b1fbe9cf0c12aef398177f 100755
--- a/tools/polymer/generate_compiled_resources_gyp.py
+++ b/tools/polymer/generate_compiled_resources_gyp.py
@@ -32,9 +32,17 @@ _COMPILED_RESOURCES_TEMPLATE = """
def main(created_by, html_files):
targets = ""
+ def _html_to_extracted(html_file):
+ assert html_file.endswith(".html")
+ return html_file[:-len(".html")] + "-extracted"
+
def _target_name(target_file):
- assert target_file.endswith(".html")
- return path.basename(target_file)[:-len(".html")] + "-extracted"
+ return _html_to_extracted(path.basename(target_file))
+
+ def _has_extracted_js(html_file):
+ return path.isfile(_html_to_extracted(html_file) + ".js")
+
+ html_files = filter(_has_extracted_js, html_files)
Dan Beam 2017/05/10 22:35:40 the fix
for html_file in sorted(html_files, key=_target_name):
html_base = path.basename(html_file)
@@ -56,10 +64,12 @@ def main(created_by, html_files):
dependencies.append(_WEB_ANIMATIONS_TARGET)
continue
- target = _target_name(import_base)
- if not path.isfile(path.join(html_dir, import_dir, target + ".js")):
+ # Only exclude these after appending web animations externs.
+ if not _has_extracted_js(path.join(html_dir, html_import)):
continue
+ target = _target_name(import_base)
+
if import_dir:
target = "compiled_resources2.gyp:" + target
« no previous file with comments | « third_party/polymer/v1_0/generate_gyp.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698