| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 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 13 matching lines...) Expand all Loading... |
| 24 _HTML_RESOURCES_PATH = os.path.join(_RESOURCES_PATH, 'html') | 24 _HTML_RESOURCES_PATH = os.path.join(_RESOURCES_PATH, 'html') |
| 25 _JS_RESOURCES_PATH = os.path.join(_RESOURCES_PATH, 'js') | 25 _JS_RESOURCES_PATH = os.path.join(_RESOURCES_PATH, 'js') |
| 26 | 26 |
| 27 _POLYMER_PATH = os.path.join( | 27 _POLYMER_PATH = os.path.join( |
| 28 _SRC_PATH, 'third_party', 'polymer', 'v1_0', 'components-chromium') | 28 _SRC_PATH, 'third_party', 'polymer', 'v1_0', 'components-chromium') |
| 29 | 29 |
| 30 _VULCANIZE_ARGS = [ | 30 _VULCANIZE_ARGS = [ |
| 31 '--exclude', 'crisper.js', | 31 '--exclude', 'crisper.js', |
| 32 | 32 |
| 33 # These files are already combined and minified. | 33 # These files are already combined and minified. |
| 34 '--exclude', 'polymer-extracted.js', | 34 '--exclude', 'chrome://resources/html/polymer.html', |
| 35 '--exclude', 'polymer-micro-extracted.js', | |
| 36 '--exclude', 'polymer-mini-extracted.js', | |
| 37 '--exclude', 'polymer_config.js', | |
| 38 '--exclude', 'web-animations-next-lite.min.js', | 35 '--exclude', 'web-animations-next-lite.min.js', |
| 39 | 36 |
| 40 # These files are dynamically created by C++. | 37 # These files are dynamically created by C++. |
| 41 '--exclude', 'load_time_data.js', | 38 '--exclude', 'load_time_data.js', |
| 42 '--exclude', 'strings.js', | 39 '--exclude', 'strings.js', |
| 43 '--exclude', 'text_defaults.css', | 40 '--exclude', 'text_defaults.css', |
| 44 '--exclude', 'text_defaults_md.css', | 41 '--exclude', 'text_defaults_md.css', |
| 45 | 42 |
| 46 '--inline-css', | 43 '--inline-css', |
| 47 '--inline-scripts', | 44 '--inline-scripts', |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 _run_cmd(['crisper', '--source', tmp.name, | 76 _run_cmd(['crisper', '--source', tmp.name, |
| 80 '--script-in-head', 'false', | 77 '--script-in-head', 'false', |
| 81 '--html', _HTML_OUT_PATH, | 78 '--html', _HTML_OUT_PATH, |
| 82 '--js', _JS_OUT_PATH]) | 79 '--js', _JS_OUT_PATH]) |
| 83 finally: | 80 finally: |
| 84 os.remove(tmp.name) | 81 os.remove(tmp.name) |
| 85 | 82 |
| 86 | 83 |
| 87 if __name__ == '__main__': | 84 if __name__ == '__main__': |
| 88 main() | 85 main() |
| OLD | NEW |