| 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 16 matching lines...) Expand all Loading... |
| 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', 'polymer-extracted.js', |
| 35 '--exclude', 'polymer-micro-extracted.js', | 35 '--exclude', 'polymer-micro-extracted.js', |
| 36 '--exclude', 'polymer-mini-extracted.js', | 36 '--exclude', 'polymer-mini-extracted.js', |
| 37 '--exclude', 'web-animations-next-lite.min.js', |
| 38 |
| 39 # Because we're excluding polymer-* files, they are run earlier as separate |
| 40 # <script>s. polymer_config.js must run before any polymer-*.js, so it must be |
| 41 # excluded from vulcanization as well to have any effect. |
| 37 '--exclude', 'polymer_config.js', | 42 '--exclude', 'polymer_config.js', |
| 38 '--exclude', 'web-animations-next-lite.min.js', | |
| 39 | 43 |
| 40 # These files are dynamically created by C++. | 44 # These files are dynamically created by C++. |
| 41 '--exclude', 'load_time_data.js', | 45 '--exclude', 'load_time_data.js', |
| 42 '--exclude', 'strings.js', | 46 '--exclude', 'strings.js', |
| 43 '--exclude', 'text_defaults.css', | 47 '--exclude', 'text_defaults.css', |
| 44 '--exclude', 'text_defaults_md.css', | 48 '--exclude', 'text_defaults_md.css', |
| 45 | 49 |
| 46 '--inline-css', | 50 '--inline-css', |
| 47 '--inline-scripts', | 51 '--inline-scripts', |
| 48 | 52 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 79 _run_cmd(['crisper', '--source', tmp.name, | 83 _run_cmd(['crisper', '--source', tmp.name, |
| 80 '--script-in-head', 'false', | 84 '--script-in-head', 'false', |
| 81 '--html', _HTML_OUT_PATH, | 85 '--html', _HTML_OUT_PATH, |
| 82 '--js', _JS_OUT_PATH]) | 86 '--js', _JS_OUT_PATH]) |
| 83 finally: | 87 finally: |
| 84 os.remove(tmp.name) | 88 os.remove(tmp.name) |
| 85 | 89 |
| 86 | 90 |
| 87 if __name__ == '__main__': | 91 if __name__ == '__main__': |
| 88 main() | 92 main() |
| OLD | NEW |