#rocket #sass #fairing

rocket-sass-fairing

A rocket fairing for easily serving compiled sass with cache policy

3 releases

0.1.1 Jan 8, 2022
0.1.0 Jan 8, 2022

#11 in #fairing

MIT license

7KB
101 lines

Rocket Assets Fairing

rocket-sass-fairing is a Fairing for Rocket for easily serving serving a compiled sass stylesheet.

Installing

Add to your Cargo.toml:

rocket-sass-fairing = "0.1-pre1"

Usage

TODO

Configuration

TODO


lib.rs:

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 }
#

Dependencies

~16–52MB
~843K SLoC