Chromium Code Reviews| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 | 59 |
| 60 return stdout | 60 return stdout |
| 61 | 61 |
| 62 output = _run_cmd(['vulcanize'] + _VULCANIZE_ARGS + [_HTML_IN_PATH]) | 62 output = _run_cmd(['vulcanize'] + _VULCANIZE_ARGS + [_HTML_IN_PATH]) |
| 63 | 63 |
| 64 with tempfile.NamedTemporaryFile(mode='wt+', delete=False) as tmp: | 64 with tempfile.NamedTemporaryFile(mode='wt+', delete=False) as tmp: |
| 65 tmp.write(output.replace( | 65 tmp.write(output.replace( |
| 66 '<include src="', '<include src="../../../../ui/webui/resources/js/')) | 66 '<include src="', '<include src="../../../../ui/webui/resources/js/')) |
| 67 | 67 |
| 68 try: | 68 try: |
| 69 _run_cmd(['crisper', '--source', tmp.name, '--html', _HTML_OUT_PATH, | 69 _run_cmd(['crisper', '--source', tmp.name, |
| 70 '--js', _JS_OUT_PATH]) | 70 '--script-in-head', 'false', |
|
Dan Beam
2016/01/21 23:35:12
^ needed this
| |
| 71 '--html', _HTML_OUT_PATH, | |
| 72 '--js', _JS_OUT_PATH]) | |
| 71 finally: | 73 finally: |
| 72 os.remove(tmp.name) | 74 os.remove(tmp.name) |
| 73 | 75 |
| 74 | 76 |
| 75 if __name__ == '__main__': | 77 if __name__ == '__main__': |
| 76 main() | 78 main() |
| OLD | NEW |