Crate rocket_sass_fairing[][src]

Expand description

Easily compile and serve a sass/scss style sheet through Rocket.

use rocket::{launch, get, routes};
use rocket_sass_fairing::SassSheet;

#[launch]
fn rocket() -> _ {
    rocket::build()
        .attach(SassSheet::fairing())
        .mount("/", routes![style])
}

#[get("/assets/style.css")]
async fn style(sheet: &SassSheet) -> &SassSheet { sheet }

Structs