Add Support for Plugin Scripts (#1008)

This commit is contained in:
Sasial
2025-04-03 04:37:49 +10:00
committed by GitHub
parent 833320de64
commit 73ed5ae697
4 changed files with 54 additions and 0 deletions

View File

@@ -202,6 +202,7 @@ pub enum Middleware {
ServerScript,
ClientScript,
ModuleScript,
PluginScript,
Project,
Rbxm,
Rbxmx,
@@ -227,6 +228,7 @@ impl Middleware {
Self::ServerScript => snapshot_lua(context, vfs, path, name, ScriptType::Server),
Self::ClientScript => snapshot_lua(context, vfs, path, name, ScriptType::Client),
Self::ModuleScript => snapshot_lua(context, vfs, path, name, ScriptType::Module),
Self::PluginScript => snapshot_lua(context, vfs, path, name, ScriptType::Plugin),
Self::Project => snapshot_project(context, vfs, path, name),
Self::Rbxm => snapshot_rbxm(context, vfs, path, name),
Self::Rbxmx => snapshot_rbxmx(context, vfs, path, name),
@@ -286,6 +288,8 @@ pub fn default_sync_rules() -> &'static [SyncRule] {
sync_rule!("*.server.luau", ServerScript, ".server.luau"),
sync_rule!("*.client.lua", ClientScript, ".client.lua"),
sync_rule!("*.client.luau", ClientScript, ".client.luau"),
sync_rule!("*.plugin.lua", PluginScript, ".plugin.lua"),
sync_rule!("*.plugin.luau", PluginScript, ".plugin.luau"),
sync_rule!("*.{lua,luau}", ModuleScript),
sync_rule!("*.project.json", Project, ".project.json"),
sync_rule!("*.model.json", JsonModel, ".model.json"),