mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-22 21:41:37 +00:00
Update rbx-dom (#1023)
This commit is contained in:
parent
0d6ff8ef8a
commit
833320de64
30 changed files with 8815 additions and 2249 deletions
|
|
@ -1,6 +1,7 @@
|
|||
use std::{path::Path, str};
|
||||
|
||||
use memofs::{IoResultExt, Vfs};
|
||||
use rbx_dom_weak::ustr;
|
||||
|
||||
use crate::snapshot::{InstanceContext, InstanceMetadata, InstanceSnapshot};
|
||||
|
||||
|
|
@ -15,14 +16,12 @@ pub fn snapshot_txt(
|
|||
let contents = vfs.read_to_string(path)?;
|
||||
let contents_str = contents.as_str();
|
||||
|
||||
let properties = [("Value".to_owned(), contents_str.into())];
|
||||
|
||||
let meta_path = path.with_file_name(format!("{}.meta.json", name));
|
||||
|
||||
let mut snapshot = InstanceSnapshot::new()
|
||||
.name(name)
|
||||
.class_name("StringValue")
|
||||
.properties(properties)
|
||||
.property(ustr("Value"), contents_str)
|
||||
.metadata(
|
||||
InstanceMetadata::new()
|
||||
.instigating_source(path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue