2024-12-02 16:54:17 +00:00
|
|
|
local function enter(fn: (args: { string }) -> number?): never
|
2024-12-03 14:58:15 +00:00
|
|
|
local process = require("@lune/process")
|
|
|
|
local stdio = require("@lune/stdio")
|
2024-12-02 16:54:17 +00:00
|
|
|
|
2024-12-03 14:58:15 +00:00
|
|
|
local startTime = os.clock()
|
|
|
|
local exitCode = fn(table.clone(process.args))
|
2024-12-02 16:54:17 +00:00
|
|
|
|
2024-12-03 14:58:15 +00:00
|
|
|
stdio.write(`done in {stdio.style("dim")}{string.format("%.2fs", os.clock() - startTime)}{stdio.style("reset")}!\n`)
|
2024-12-02 16:54:17 +00:00
|
|
|
|
2024-12-03 14:58:15 +00:00
|
|
|
return process.exit(exitCode)
|
2024-12-02 16:54:17 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
return enter(function(args: { string }): number?
|
2024-12-03 14:58:15 +00:00
|
|
|
local ok, _ = require("../src").generators.rojo.syncConfig(table.remove(args, 1), args, { writeToFile = true })
|
2024-12-02 16:54:17 +00:00
|
|
|
|
2024-12-03 14:58:15 +00:00
|
|
|
return tonumber(ok)
|
2024-12-02 16:54:17 +00:00
|
|
|
end)
|