mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-20 12:45:05 +00:00
Add init scripts as relevant paths to all directories.
This doesn't feel ideal. Though it's true that all directories are influenced by any init scripts they have, the directory middleware shouldn't need to know about Lua. I don't really want to go back into working on the middleware chain since it mostly feels like busywork when there are other things to build on in Rojo. also all of this feels really complicated
This commit is contained in:
@@ -47,11 +47,22 @@ impl SnapshotMiddleware for SnapshotDir {
|
||||
|
||||
let meta_path = entry.path().join("init.meta.json");
|
||||
|
||||
let relevant_paths = vec![
|
||||
entry.path().to_path_buf(),
|
||||
meta_path.clone(),
|
||||
// TODO: We shouldn't need to know about Lua existing in this
|
||||
// middleware. Should we figure out a way for that function to add
|
||||
// relevant paths to this middleware?
|
||||
entry.path().join("init.lua"),
|
||||
entry.path().join("init.server.lua"),
|
||||
entry.path().join("init.client.lua"),
|
||||
];
|
||||
|
||||
let mut snapshot = InstanceSnapshot {
|
||||
snapshot_id: None,
|
||||
metadata: InstanceMetadata {
|
||||
instigating_source: Some(entry.path().to_path_buf().into()),
|
||||
relevant_paths: vec![entry.path().to_path_buf(), meta_path.clone()],
|
||||
relevant_paths,
|
||||
..Default::default()
|
||||
},
|
||||
name: Cow::Owned(instance_name),
|
||||
|
||||
Reference in New Issue
Block a user