Chromium Code Reviews| 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 38f81578ab40b78df5e70238dfc78249a212fbee..8c976a00b5d91a9fde7810fcb34216833ce9bb0c 100755 |
| --- a/tools/polymer/generate_compiled_resources_gyp.py |
| +++ b/tools/polymer/generate_compiled_resources_gyp.py |
| @@ -32,7 +32,11 @@ _COMPILED_RESOURCES_TEMPLATE = """ |
| def main(created_by, html_files): |
| targets = "" |
| - for html_file in html_files: |
| + def _target_name(target_file): |
| + assert target_file.endswith(".html") |
| + return path.basename(target_file)[:-len(".html")] + "-extracted" |
| + |
| + for html_file in sorted(html_files, key=lambda h: _target_name(h)): |
|
michaelpg
2016/04/22 00:49:04
is the lambda necessary, or can this be just "sort
Dan Beam
2016/04/22 00:59:18
Done.
|
| html_base = path.basename(html_file) |
| if html_base in _POLYMERS: |
| continue |
| @@ -52,7 +56,7 @@ def main(created_by, html_files): |
| dependencies.append(_WEB_ANIMATIONS_TARGET) |
| continue |
| - target = import_base[:-5] + "-extracted" |
| + target = _target_name(import_base) |
| if not path.isfile(path.join(html_dir, import_dir, target + ".js")): |
| continue |