Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: chrome/browser/resources/md_downloads/vulcanize.py

Issue 1619013002: MD Downloads: vulcanize to pick up recent Polymer changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: --script-in-head=false Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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()
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_downloads/crisper.js ('k') | chrome/browser/resources/md_downloads/vulcanized.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698