--- /dev/null
+/*
+Additionnal build, doc: https://doc.rust-lang.org/cargo/reference/build-scripts.html
+
+What is build here:
+ - Compile the SASS file to CSS file.
+*/
+
+use std::process::Command;
+
+fn main() {
+ println!("cargo:rerun-if-changed=style.scss");
+
+ let output =
+ Command::new("sass")
+ .arg("./style.scss")
+ .arg("./static/style.css")
+ .output()
+ .expect("Unable to compile SASS file, install SASS, see https://sass-lang.com/");
+
+ if !output.status.success() {
+ //panic!("Unable to compile SASS file, install SASS, see https://sass-lang.com/")
+ let error = std::fs::read_to_string("./static/style.css").expect("unable to read style.css");
+ panic!(error);
+ }
+}
+++ /dev/null
-* {
- margin: 50px;
- padding: 0px;
-}
-
-body {
- font-size: 18px;
- font-family: 'Lobster Two';
- text-shadow: 2px 2px 2px #DDD;
- text-align: center;
- line-height: 30px;
- color: #5b5b5b;
- background-color: #ededed;
- margin: 0px;
-}
-
-img {
- border: 0px;
-}
-
--- /dev/null
+* {
+ margin: 50px;
+ padding: 0px;
+}
+
+body {
+ font-size: 18px;
+ font-family: 'Lobster Two';
+ text-shadow: 2px 2px 2px #DDD;
+ text-align: center;
+ line-height: 30px;
+ color: #5b5b5b;
+ background-color: #ededed;
+ margin: 0px;
+}
+
+img {
+ border: 0px;
+}
+