about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2019-11-28 00:26:59 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2019-12-02 10:25:36 +0100
commit852079fbf23e478b065895c0db49db10f9e47929 (patch)
tree1b99767ae75af686b0faf0f830c244a3f7942a20
parent35ba58f5a9a91f03b37360d9459f944978438373 (diff)
downloadrust-852079fbf23e478b065895c0db49db10f9e47929.tar.gz
rust-852079fbf23e478b065895c0db49db10f9e47929.zip
minify theme.js as well
-rw-r--r--src/librustdoc/html/render.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/librustdoc/html/render.rs b/src/librustdoc/html/render.rs
index 2d7fef56731..49471a8e938 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)?;