scripts/.lune/roblox_sync_config_generator.luau
Erica Marigold 83ab6bf97f
feat: test setup using frktest & more
* Sets up a test runner system and includes unit tests for existing
  generators using Rojo's test files.
* Configure Luau analysis and disables unnecessary lints.
* Make sync config generator accept a third options argument with a
  `force` option to generate configs even when there is a
  `default.project.json` present in the `projectDir`.
2024-12-03 14:58:15 +00:00

17 lines
608 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, { writeToFile = true })
return tonumber(ok)
end)