Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #380 from ahti/master
client-side color-scheme handling
- Loading branch information
Showing
12 changed files
with
1,042 additions
and
874 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,3 +55,6 @@ rstest = "0.6" | |
regex = "1.3.9" | ||
pretty_assertions = "0.6" | ||
url = "2.1" | ||
|
||
[build-dependencies] | ||
grass = "0.10.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use std::env; | ||
use std::fs; | ||
use std::path::Path; | ||
|
||
fn main() { | ||
let out_dir = env::var_os("OUT_DIR").expect("OUT_DIR env var missing"); | ||
let dest_path = Path::new(&out_dir).join("style.css"); | ||
fs::write( | ||
&dest_path, | ||
grass::from_string( | ||
include_str!("data/style.scss").to_string(), | ||
&grass::Options::default(), | ||
) | ||
.expect("scss failed to compile"), | ||
) | ||
.expect("failed to write css file"); | ||
|
||
println!("cargo:rerun-if-changed=data/style.scss"); | ||
} |
Oops, something went wrong.