mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-22 04:51:47 +00:00
Add a new syncRules field project files to allow users to specify middleware to use for files (#813)
This commit is contained in:
parent
c0a96e3811
commit
73828af715
48 changed files with 923 additions and 146 deletions
|
|
@ -5,16 +5,13 @@ use memofs::Vfs;
|
|||
|
||||
use crate::snapshot::{InstanceContext, InstanceMetadata, InstanceSnapshot};
|
||||
|
||||
use super::util::PathExt;
|
||||
|
||||
#[profiling::function]
|
||||
pub fn snapshot_rbxm(
|
||||
context: &InstanceContext,
|
||||
vfs: &Vfs,
|
||||
path: &Path,
|
||||
name: &str,
|
||||
) -> anyhow::Result<Option<InstanceSnapshot>> {
|
||||
let name = path.file_name_trim_end(".rbxm")?;
|
||||
|
||||
let temp_tree = rbx_binary::from_reader(vfs.read(path)?.as_slice())
|
||||
.with_context(|| format!("Malformed rbxm file: {}", path.display()))?;
|
||||
|
||||
|
|
@ -63,6 +60,7 @@ mod test {
|
|||
&InstanceContext::default(),
|
||||
&mut vfs,
|
||||
Path::new("/foo.rbxm"),
|
||||
"foo",
|
||||
)
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue