cache_bustere upgrade and static assets tests

This commit is contained in:
realaravinth
2021-04-30 21:34:44 +05:30
parent 343c37ae1c
commit c96f890236
8 changed files with 126 additions and 122 deletions

View File

@@ -42,7 +42,10 @@ pub use settings::Settings;
lazy_static! {
pub static ref SETTINGS: Settings = Settings::new().unwrap();
pub static ref S: String = env::var("S").unwrap();
pub static ref FILES: FileMap = FileMap::load();
pub static ref FILES: FileMap = {
let map = include_str!("cache_buster_data.json");
FileMap::new(&map)
};
pub static ref JS: &'static str = FILES.get("./static/bundle/main.js").unwrap();
pub static ref CSS: &'static str = FILES.get("./static/bundle/main.css").unwrap();
}