diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-05-15 14:26:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-15 14:26:59 +0200 |
| commit | 934e37aeb4c3dfd220e044827b91dcc106dd331b (patch) | |
| tree | 6a3d46248ee900492ef497569bbc6e6ab2c3b349 /src/librustdoc/lib.rs | |
| parent | 91c648b9c1ea2a12882d0e1a643586c71f71bb11 (diff) | |
| parent | e2db0a5630a39fc1725cae1e804120cff75dc1cb (diff) | |
Rollup merge of #50632 - GuillaumeGomez:minification, r=ollie27
Add minification process r? @QuietMisdreavus
Diffstat (limited to 'src/librustdoc/lib.rs')
| -rw-r--r-- | src/librustdoc/lib.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index f2da09e1603..d4244bfdba0 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -48,6 +48,7 @@ extern crate test as testing; extern crate rustc_errors as errors; extern crate pulldown_cmark; extern crate tempdir; +extern crate minifier; extern crate serialize as rustc_serialize; // used by deriving @@ -299,6 +300,11 @@ pub fn opts() -> Vec<RustcOptGroup> { "How errors and other messages are produced", "human|json|short") }), + unstable("disable-minification", |o| { + o.optflag("", + "disable-minification", + "Disable minification applied on JS files") + }), ] } @@ -480,6 +486,7 @@ pub fn main_args(args: &[String]) -> isize { let linker = matches.opt_str("linker").map(PathBuf::from); let sort_modules_alphabetically = !matches.opt_present("sort-modules-by-appearance"); let resource_suffix = matches.opt_str("resource-suffix"); + let enable_minification = !matches.opt_present("disable-minification"); let edition = matches.opt_str("edition").unwrap_or("2015".to_string()); let edition = match edition.parse() { @@ -523,7 +530,8 @@ pub fn main_args(args: &[String]) -> isize { css_file_extension, renderinfo, sort_modules_alphabetically, - themes) + themes, + enable_minification) .expect("failed to generate documentation"); 0 } |
