From 852079fbf23e478b065895c0db49db10f9e47929 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Thu, 28 Nov 2019 00:26:59 +0100 Subject: [PATCH] minify theme.js as well --- src/librustdoc/html/render.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs index 2d7fef56731a2..49471a8e938a9 100644 --- a/src/librustdoc/html/render.rs +++ b/src/librustdoc/html/render.rs @@ -644,10 +644,9 @@ themePicker.onblur = handleThemeButtonsBlur; themes.appendChild(but); }});"#, as_json(&themes)); - write(cx.dst.join(&format!("theme{}.js", cx.shared.resource_suffix)), - theme_js.as_bytes() - )?; - + write_minify(&cx.shared.fs, cx.path("theme.js"), + &theme_js, + options.enable_minification)?; write_minify(&cx.shared.fs, cx.path("main.js"), static_files::MAIN_JS, options.enable_minification)?;