Rust library to generate static websites
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: small fixes

+29 -10
+7
.sampo/changesets/grumpy-earl-vainamoinen.md
··· 1 + --- 2 + packages: 3 + - maudit-cli 4 + release: patch 5 + --- 6 + 7 + Fixes missing DEV flag on rebuilds
+7
.sampo/changesets/venerable-duchess-loviatar.md
··· 1 + --- 2 + packages: 3 + - maudit 4 + release: patch 5 + --- 6 + 7 + Updates default quality for webp to 80 to match sharp
+14 -9
crates/maudit-cli/src/dev.rs
··· 11 11 use tokio::sync::broadcast; 12 12 use tracing::{debug, error, info}; 13 13 use watchexec::{ 14 - command::{Command, Program}, 14 + command::{Command, Program, Shell}, 15 15 job::CommandState, 16 16 Watchexec, 17 17 }; ··· 55 55 return action; 56 56 } else { 57 57 info!(name: "build", "Detected changes. Rebuilding…"); 58 + 59 + // TODO: This kinda sucks but watchexec doesn't support setting env vars on commands 60 + // Maybe I need to use something else than watchexec 61 + let (shell, command) = if cfg!(windows) { 62 + ("cmd", "/C set MAUDIT_DEV=true && set MAUDIT_QUIET=true && cargo run --quiet") 63 + } else { 64 + ("sh", "MAUDIT_DEV=true MAUDIT_QUIET=true cargo run --quiet") 65 + }; 66 + 58 67 let (_, job) = action.create_job(Arc::new(Command { 59 - program: Program::Exec { 60 - prog: "cargo".into(), 61 - args: vec![ 62 - "run".into(), 63 - "--quiet".into(), 64 - "--".into(), 65 - "--quiet".into(), 66 - ], 68 + program: Program::Shell { 69 + shell: Shell::new(shell), 70 + command: command.into(), 71 + args: vec![], 67 72 }, 68 73 options: Default::default(), 69 74 }));
+1 -1
crates/maudit/src/build/images.rs
··· 21 21 // TODO: Add a way for people to choose lossless WebP encoding, despite the larger file sizes 22 22 if new_format == ImageFormat::Webp { 23 23 let encoder: Encoder = Encoder::from_image(&img).unwrap(); 24 - let webp: WebPMemory = encoder.encode(90f32); // TODO: Allow configuring quality 24 + let webp: WebPMemory = encoder.encode(80f32); // TODO: Allow configuring quality 25 25 std::fs::write(dest_path, &*webp).unwrap(); 26 26 } else { 27 27 let file = File::create(dest_path).unwrap();