scripts/lune/rojo/sourcemap_generator.luau

13 lines
460 B
Text
Raw Normal View History

2024-08-11 16:43:54 +01:00
local process = require("@lune/process")
2024-08-12 00:15:04 +01:00
local fs = require("@lune/fs")
local stdio = require("@lune/stdio")
2024-08-11 16:43:54 +01:00
2024-08-12 00:15:04 +01:00
local project_path = process.args[1]
if fs.isFile(project_path .. "/default.project.json") then
process.spawn("rojo", { "sourcemap", project_path }, { cwd = process.cwd, stdio = "forward" })
else
-- use stderr to avoid this being parsed as the output of the sourcemap command
stdio.ewrite("no default.project.json found in " .. project_path)
end