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

Unified Diff: chrome/browser/resources/vulcanize.py

Issue 2257723002: MD WebUI: Uglify vulcanized javascript bundles to remove comments/whitespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reparent and rebase Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/md_history/app.crisper.js ('k') | docs/vulcanize.md » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/vulcanize.py
diff --git a/chrome/browser/resources/vulcanize.py b/chrome/browser/resources/vulcanize.py
index d2773161da0bc23add7d1747bd3eca15184fc6ff..789fff2605e7134b52efb1700611edd15fe7f482 100755
--- a/chrome/browser/resources/vulcanize.py
+++ b/chrome/browser/resources/vulcanize.py
@@ -85,6 +85,13 @@ def _vulcanize(directory, host, html_in_file, html_out_file='vulcanized.html',
'--script-in-head', 'false',
'--html', html_out_path,
'--js', js_out_path])
+
+ # TODO(tsergeant): Remove when JS resources are minified by default:
+ # crbug.com/619091.
+ _run_cmd(['uglifyjs', js_out_path,
+ '--beautify', 'indent-level=2,quote_style=3',
+ '--comments', '/Copyright|license|LICENSE|\<\/?if/',
+ '--output', js_out_path])
finally:
os.remove(tmp.name)
« no previous file with comments | « chrome/browser/resources/md_history/app.crisper.js ('k') | docs/vulcanize.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698