Compare commits

...

3 commits

Author SHA1 Message Date
Paolo Barbolini
cb9903a12b
docker: respect Cargo.lock during build (#209) 2023-11-26 22:06:44 +01:00
Paolo Barbolini
1e23f5e5b2
Replace sass-rs with grass (#208) 2023-11-26 20:32:26 +00:00
Paolo Barbolini
69ed102737
cargo: bump dependencies (#207) 2023-11-26 20:13:03 +00:00
4 changed files with 813 additions and 686 deletions

1482
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -40,5 +40,5 @@ tokio = { version = "1.24.2", features = ["rt-multi-thread", "macros", "sync", "
toml = "0.8"
[build-dependencies]
sass-rs = "0.2"
grass = { version = "0.13", default-features = false }
sha-1 = "0.10"

View file

@ -1,7 +1,7 @@
FROM rust:bookworm as build
COPY . /src
RUN cargo install --path /src
RUN cargo install --path /src --locked
FROM debian:bookworm

View file

@ -1,5 +1,3 @@
extern crate sass_rs as sass;
use std::env;
use std::fs;
use std::path::Path;
@ -7,12 +5,11 @@ use std::path::Path;
use sha1::{Digest, Sha1};
fn build_style() -> String {
let options = sass::Options {
output_style: sass::OutputStyle::Compressed,
..Default::default()
};
sass::compile_file("./assets/styles/main.sass", options).expect("failed to compile style sheet")
grass::from_path(
"assets/styles/main.sass",
&grass::Options::default().style(grass::OutputStyle::Compressed),
)
.expect("failed to compile style sheet")
}
fn main() {