From fb32d66cc6932be2849279b8c9e905afa0b38ede Mon Sep 17 00:00:00 2001 From: daimond113 <72147841+daimond113@users.noreply.github.com> Date: Sun, 20 Oct 2024 13:36:44 +0200 Subject: [PATCH] fix: correct rojo sync config paths --- lune/rojo/roblox_sync_config_generator.luau | 16 ++++++++++++---- lune/rojo/sourcemap_generator.luau | 2 +- stylua.toml | 2 ++ 3 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 stylua.toml diff --git a/lune/rojo/roblox_sync_config_generator.luau b/lune/rojo/roblox_sync_config_generator.luau index d6d4d7c..3631255 100644 --- a/lune/rojo/roblox_sync_config_generator.luau +++ b/lune/rojo/roblox_sync_config_generator.luau @@ -1,5 +1,5 @@ -local process = require("@lune/process") local fs = require("@lune/fs") +local process = require("@lune/process") local serde = require("@lune/serde") local package_directory = process.args[1] @@ -20,7 +20,7 @@ for i, file in process.args do local name = string.gsub(file, ".luau?$", "") if name == "init" then - output["$path"] = file + output.tree["$path"] = file continue end @@ -29,8 +29,16 @@ for i, file in process.args do } end -if not output["$path"] then - output["$className"] = "Folder" +if not output.tree["$path"] then + output.tree["$className"] = "Folder" +end + +if not output.tree["roblox_packages"] then + output.tree["roblox_packages"] = { + ["$path"] = { + optional = "roblox_packages", + }, + } end fs.writeFile(package_directory .. "/default.project.json", serde.encode("json", output, true)) diff --git a/lune/rojo/sourcemap_generator.luau b/lune/rojo/sourcemap_generator.luau index 934570d..1ab4a7c 100644 --- a/lune/rojo/sourcemap_generator.luau +++ b/lune/rojo/sourcemap_generator.luau @@ -1,5 +1,5 @@ -local process = require("@lune/process") local fs = require("@lune/fs") +local process = require("@lune/process") local stdio = require("@lune/stdio") local package_directory = process.args[1] diff --git a/stylua.toml b/stylua.toml new file mode 100644 index 0000000..056139b --- /dev/null +++ b/stylua.toml @@ -0,0 +1,2 @@ +[sort_requires] +enabled = true \ No newline at end of file