mirror of
https://github.com/pesde-pkg/scripts.git
synced 2024-12-12 07:00:35 +00:00
fix: use new script format
This commit is contained in:
parent
a0e6de8d6b
commit
c6d9f2e6cf
2 changed files with 16 additions and 3 deletions
|
@ -2,13 +2,17 @@ local process = require("@lune/process")
|
||||||
local fs = require("@lune/fs")
|
local fs = require("@lune/fs")
|
||||||
local serde = require("@lune/serde")
|
local serde = require("@lune/serde")
|
||||||
|
|
||||||
local package_directory = process.cwd
|
local package_directory = process.args[1]
|
||||||
|
|
||||||
local output = {
|
local output = {
|
||||||
tree = {},
|
tree = {},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, file in process.args do
|
for i, file in process.args do
|
||||||
|
if i == 1 then
|
||||||
|
continue
|
||||||
|
end
|
||||||
|
|
||||||
local name = string.gsub(file, ".luau?$", "")
|
local name = string.gsub(file, ".luau?$", "")
|
||||||
|
|
||||||
if name == "init" then
|
if name == "init" then
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
local process = require("@lune/process")
|
local process = require("@lune/process")
|
||||||
|
local fs = require("@lune/fs")
|
||||||
|
local stdio = require("@lune/stdio")
|
||||||
|
|
||||||
process.spawn("rojo", { "sourcemap" }, { cwd = process.cwd, stdio = "forward" })
|
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
|
||||||
|
|
Loading…
Reference in a new issue