diff --git a/src/main.rs b/src/main.rs index 4620377..e00a3c1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1476,16 +1476,11 @@ enum TooComplicated{ async fn compile(config:CompileConfig)->AResult<()>{ //basically decompile in reverse order //load template dom - let input={ - let template_path=config.template.unwrap_or_else(||{ - let mut template_path=config.input_folder.clone(); - template_path.push("template.rbxlx"); - template_path - }); + let mut dom=match config.template{ //mr dom doesn't like tokio files - std::io::BufReader::new(std::fs::File::open(template_path)?) + Some(template_path)=>load_dom(std::io::BufReader::new(std::fs::File::open(template_path)?))?, + None=>rbx_dom_weak::WeakDom::default(), }; - let mut dom=load_dom(input)?; //hack to traverse root folder as the root object dom.root_mut().name="src".to_owned();