| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import os | 6 import os |
| 7 import subprocess | 7 import subprocess |
| 8 import sys | 8 import sys |
| 9 import tempfile | 9 import tempfile |
| 10 | 10 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 | 103 |
| 104 def _css_build(directory, files): | 104 def _css_build(directory, files): |
| 105 target_path = os.path.join(_HERE_PATH, directory) | 105 target_path = os.path.join(_HERE_PATH, directory) |
| 106 paths = map(lambda f: os.path.join(target_path, f), files) | 106 paths = map(lambda f: os.path.join(target_path, f), files) |
| 107 | 107 |
| 108 _run_node([node_modules.PathToPolymerCssBuild()] + paths) | 108 _run_node([node_modules.PathToPolymerCssBuild()] + paths) |
| 109 | 109 |
| 110 | 110 |
| 111 def main(): | 111 def main(): |
| 112 _vulcanize(directory='md_downloads', host='downloads', | |
| 113 html_in_file='downloads.html') | |
| 114 _css_build(directory='md_downloads', files=['vulcanized.html']) | |
| 115 | |
| 116 # Already loaded by history.html: | 112 # Already loaded by history.html: |
| 117 history_extra_args = ['--exclude', 'chrome://resources/html/util.html', | 113 history_extra_args = ['--exclude', 'chrome://resources/html/util.html', |
| 118 '--exclude', 'chrome://history/constants.html'] | 114 '--exclude', 'chrome://history/constants.html'] |
| 119 _vulcanize(directory='md_history', host='history', html_in_file='app.html', | 115 _vulcanize(directory='md_history', host='history', html_in_file='app.html', |
| 120 html_out_file='app.vulcanized.html', js_out_file='app.crisper.js', | 116 html_out_file='app.vulcanized.html', js_out_file='app.crisper.js', |
| 121 extra_args=history_extra_args) | 117 extra_args=history_extra_args) |
| 122 | 118 |
| 123 # Ensures that no file transitively imported by app.vulcanized.html is | 119 # Ensures that no file transitively imported by app.vulcanized.html is |
| 124 # imported by lazy_load.vulcanized.html. | 120 # imported by lazy_load.vulcanized.html. |
| 125 lazy_load_extra_args = ['--exclude', 'chrome://history/app.html'] | 121 lazy_load_extra_args = ['--exclude', 'chrome://history/app.html'] |
| 126 _vulcanize(directory='md_history', host='history', | 122 _vulcanize(directory='md_history', host='history', |
| 127 html_in_file='lazy_load.html', | 123 html_in_file='lazy_load.html', |
| 128 html_out_file='lazy_load.vulcanized.html', | 124 html_out_file='lazy_load.vulcanized.html', |
| 129 js_out_file='lazy_load.crisper.js', | 125 js_out_file='lazy_load.crisper.js', |
| 130 extra_args=history_extra_args + lazy_load_extra_args) | 126 extra_args=history_extra_args + lazy_load_extra_args) |
| 131 _css_build(directory='md_history', files=['app.vulcanized.html', | 127 _css_build(directory='md_history', files=['app.vulcanized.html', |
| 132 'lazy_load.vulcanized.html']) | 128 'lazy_load.vulcanized.html']) |
| 133 | 129 |
| 134 | 130 |
| 135 if __name__ == '__main__': | 131 if __name__ == '__main__': |
| 136 main() | 132 main() |
| OLD | NEW |