forked from rojo-rbx/rojo
Implement instance tree visualization
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
use std::{fs, path::Path};
|
||||
|
||||
static LOGO: &[u8] = include_bytes!("../../assets/logo-512.png");
|
||||
static ICON: &[u8] = include_bytes!("../../assets/icon-32.png");
|
||||
static HOME_CSS: &str = include_str!("../../assets/index.css");
|
||||
@@ -8,12 +6,14 @@ macro_rules! declare_asset {
|
||||
($name: ident, $path: expr) => {
|
||||
pub fn $name() -> &'static str {
|
||||
if cfg!(feature = "dev-live-assets") {
|
||||
use std::{fs::read_to_string, path::Path};
|
||||
|
||||
let file_path = Path::new(file!());
|
||||
let asset_path = file_path.parent().unwrap().join($path);
|
||||
|
||||
println!("Reloading {}", asset_path.display());
|
||||
|
||||
let content = fs::read_to_string(asset_path)
|
||||
let content = read_to_string(asset_path)
|
||||
.expect("Couldn't read dev live asset")
|
||||
.into_boxed_str();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user