scripts/.lune/roblox_sync_config_generator.luau
Erica Marigold 84720a2885
refactor: restructure repo and setup as library
Restructures the project to be a library with generator exports, and
includes lune scripts as examples on how to use exported generators by
the library.

Also specifies `includes` and pins a pesde version in the package
manifest.
2024-12-02 16:54:17 +00:00

19 lines
573 B
Text

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