From 5aed3a4a1d28011997eca4d8a7a34055f7a86eaf Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Wed, 4 Oct 2017 00:03:06 +0900 Subject: [PATCH] Default to compressed sass output --- components/site/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/site/src/lib.rs b/components/site/src/lib.rs index 5ecdd54c..b018dc57 100644 --- a/components/site/src/lib.rs +++ b/components/site/src/lib.rs @@ -28,7 +28,7 @@ use std::path::{Path, PathBuf}; use glob::glob; use tera::{Tera, Context}; use walkdir::WalkDir; -use sass_rs::{Options, compile_file}; +use sass_rs::{Options, OutputStyle, compile_file}; use errors::{Result, ResultExt}; use config::{Config, get_config}; @@ -518,9 +518,11 @@ impl Site { .filter(|entry| !entry.as_path().file_name().unwrap().to_string_lossy().starts_with('_')) .collect::>(); + let mut sass_options = Options::default(); + sass_options.output_style = OutputStyle::Compressed; for file in files { let name = file.as_path().file_stem().unwrap().to_string_lossy(); - let css = match compile_file(file.as_path(), Options::default()) { + let css = match compile_file(file.as_path(), sass_options.clone()) { Ok(c) => c, Err(e) => bail!(e) };